Tuesday, January 23, 2007

Linux Shell

Linux Shell

List Files and Directories without Color Coding

$ls --color=none -all

List Files with Auto-Refresh

while [ 1 ]; do clear; ls -allh; sleep 5; done

Generate and Check MD5

$md5sum FILE > md5sum.txt
$md5sum -c md5.txt

Generate the Date of the Form: January_01_YYYY.$ext

$NOW=`date +%B_%d_%a_%Y

Get the Total Size of a Directory and File

$du -hcs dir/dir
$du -h file.tar.gz

Search for Text Pattern in Files

$egrep "stuff.php" *

No comments: