Writing /home/k4ml/webapps/drupal5/wiki/data/cache/b/bb60dafe1aea3c0ff277535a0cfb22b6.i failed
Writing /home/k4ml/webapps/drupal5/wiki/data/cache/b/bb60dafe1aea3c0ff277535a0cfb22b6.i failed
Writing /home/k4ml/webapps/drupal5/wiki/data/cache/b/bb60dafe1aea3c0ff277535a0cfb22b6.xhtml failed

My Linux Command

Mplayer + find

$ find jclip -iname "*musume*" -exec mplayer -v {} \;
This command will play all matched files in the directory. -iname options will ignore case-sensitivity. Another option is to use -ok switch. $ find jclip -iname “*musume*” -ok mplayer -v {} \; This one will ask for conformation for each file. Thanks to root@ittutor.net for the tips.

Copying files over SSH

$ scp -v kamal@prokab.ath.cx:/home/video/*.asf .
It will prompt for password and if correct will start copying all files that end with asf strings in the video directory from the remote system to our current directory. The username should be a valid username on the remote system.

find & grep

find . -iname "*smallville*.mp3" -maxdepth 1 -type f -exec mv {} smallville/. \;
find akan cari fail yang mempunyai nama yang berpatenkan *smallville*.mp3 tanpa mengira jenis askara (case insensitive) pada direktori . tanpa masuk kemana-mana direktori lain -maxdepth 1 dan akan menggerakkan mv fail tersebut ke direktori smallville. - thanks to root@ittutor.net, mnajem@ittutor.net
find . -maxdepth 1 -type d -ls

list all directories in current directory.

file

file * | awk -F":" '($2 ~ /MP3/) {print $1}'
bagi mencari fail yang betul-betul berformatkan MP3, sebab kalau saya buat satu fail kosong yang bernama dummy.MP3 atau DUMMY.MP3, skrip ini akan tidak memperdulikan fail-fail sedemikian. - root@ittutor.net

tar & gzip

tar -czf test.tar.gz test
create test.tar.gz of directory test

rot 13 encryption

man tr | tr [a-zA-Z] [n-za-mN-ZA-M] | tr [a-zA-Z] [n-za-mN-ZA-M]

download real audio file

mplayer -noframedrop -dumpfile out.rm -dumpstream rtsp://url/to/file.rm
ref: http://thomer.com/howtos/capture_realstream.html
mplayer -playlist file.ram -ao pcm:file=file.wav -vc dummy -vo null

calculate total file size

du -sh *.avi | cut -d'M' -f1 | awk '{total +=$1}; END {print total}'
 
linux/linuxcommand.txt · Last modified: 2008/01/17 08:59 by 60.51.37.209