目前分類:Linux (49)
- Aug 16 Thu 2012 14:19
Re-Sync files using rsync command
- Aug 15 Wed 2012 12:07
Find Particular Processes in Linux and Kill Them
Find Particular Processes (take java program as an example) in Linux and Kill Them:
kill -9 `ps -ef | grep java | grep -v grep | awk '{print $2}'` > /dev/null 2>&1
- Jun 07 Thu 2012 14:17
Change / Update Current Network Card Driver on LInux
Part I - Change / Update Current Network Card Driver on Linux (with RPM):
# install new network card driver by:
- Jun 07 Thu 2012 13:05
Checking Current Network Card Driver on Linux
Checking Current Network Card Driver on Linux:
# ethtool -i eth0
- Jun 05 Tue 2012 17:14
Replace a String With Another String In All Files Using sed command
Replace a String With Another String In All Files Using sed command:
cat test_replace.sh
- Apr 18 Wed 2012 14:06
find particular files and copy them to a directory
find particular files and copy them to a directory:
find ./ -name *.log -exec cp -p {} /my_copy_folder/ \;
- Mar 26 Mon 2012 10:43
How to Mount the CD ROM in Linux
# for mounting the CD
mkdir -p /media/cdrom/Server
- Feb 08 Wed 2012 10:00
Increase swap space with a new swap file
# checking existing swap space:
swapon -s
- Jan 18 Wed 2012 11:03
Cannot switch a user to root using "su -"
Problem: Cannot switch a normal user to root using "su - ":
ls -l /bin/su
- Jan 17 Tue 2012 17:11
Steps for Mounting a Device Mapper (SAN) Disk on Linux
ls -l /dev/mpath
mkdir /mydisk
- Jan 16 Mon 2012 12:02
Check and repair a LInux file system (fsck)
1. reboot linux in Single User Mode by:
init 1
2. umount /oracle
- Jan 11 Wed 2012 18:13
Remount a read-only partition
- Dec 27 Tue 2011 16:32
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
- Dec 21 Wed 2011 14:51
Invert match with "grep" command
ps -ef | grep ASM
=> "grep ASM" would show up on the list
- Nov 03 Thu 2011 17:08
Find Files Containing Certain String Within a Folder
Find Files Containing Certain String Within a Folder:
- Oct 25 Tue 2011 11:35
Shell Script (BASH) for Reading Hidden Password
- Oct 13 Thu 2011 16:02
Disable Root SSH Login on Linux
Disable Root SSH Login on Linux:
vi /etc/ssh/sshd_config
- Sep 16 Fri 2011 18:26
Overwrite an existing file without prompt (Linux)
- Sep 16 Fri 2011 15:34
Linux Background Tasks
Any Linux command can be ran in the background by putting a "&" at the end of the command.
e.g.
- Sep 09 Fri 2011 11:20
Remove BOM (Byte Order Mark)
Sell script for removing BOM (Byte Order Mark) :
# Rename all file extension (.src) to (.bom)
for f in *.src;