目前分類:Linux (49)

瀏覽方式: 標題列表 簡短摘要

rsync -arv -e ssh --ignore-existing test_dir <remote_ip>:/my_copy_dir

 

DanBrother 發表在 痞客邦 留言(0) 人氣()

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

DanBrother 發表在 痞客邦 留言(0) 人氣()

Part I - Change / Update Current Network Card Driver on Linux  (with RPM):

# install new network card driver by:

DanBrother 發表在 痞客邦 留言(0) 人氣()

Checking Current Network Card Driver on Linux:

# ethtool -i eth0

DanBrother 發表在 痞客邦 留言(0) 人氣()

Replace a String With Another String In All Files Using sed command:

cat test_replace.sh

DanBrother 發表在 痞客邦 留言(0) 人氣()

find particular files and copy them to a directory:

find ./ -name *.log -exec cp -p {} /my_copy_folder/ \;

DanBrother 發表在 痞客邦 留言(0) 人氣()

# for mounting the CD

mkdir -p /media/cdrom/Server

DanBrother 發表在 痞客邦 留言(0) 人氣()

# checking existing swap space:
swapon -s

DanBrother 發表在 痞客邦 留言(0) 人氣()

Problem: Cannot switch a normal user to root  using "su - ":

ls -l /bin/su

DanBrother 發表在 痞客邦 留言(0) 人氣()

ls -l /dev/mpath
mkdir /mydisk

DanBrother 發表在 痞客邦 留言(0) 人氣()

1. reboot linux in Single User Mode by:
    init 1
2. umount /oracle

DanBrother 發表在 痞客邦 留言(0) 人氣()

Remount a read-only partition:

mount -o remount,rw /

 

DanBrother 發表在 痞客邦 留言(0) 人氣()

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

DanBrother 發表在 痞客邦 留言(0) 人氣()


ps -ef | grep ASM
=> "grep ASM" would show up on the list

DanBrother 發表在 痞客邦 留言(0) 人氣()


Find Files Containing Certain String Within a Folder:

DanBrother 發表在 痞客邦 留言(0) 人氣()

Shell Script (BASH) for Reading Hidden Password:

stty_orig=`stty -g`

DanBrother 發表在 痞客邦 留言(0) 人氣()

Disable Root SSH Login on Linux:

vi /etc/ssh/sshd_config

DanBrother 發表在 痞客邦 留言(0) 人氣()


Normally cp would have an alias of the follwing:
which cp

DanBrother 發表在 痞客邦 留言(0) 人氣()

Any Linux command can be ran in the background by putting a "&" at the end of the command.

e.g.

DanBrother 發表在 痞客邦 留言(0) 人氣()

Sell script for removing BOM (Byte Order Mark)   :

# Rename all file extension (.src) to  (.bom)
for f in *.src;

DanBrother 發表在 痞客邦 留言(0) 人氣()

«12 3
Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼