[root@alanstudio]# awk '{print $3}' awk - print out the thrid column context[root@alanstudio]# cat /var/log/maillog | grep alan show the context and print lines matching with word "alan"[root@alanstudio]# cut -d ':' -f1,2 show the file context that remove sections with letter ":" from each lineof files, and show only column 1 and 2 (count in forward with :) eg: echo "ab:cd:ef:gh:ij:" | cut -d ':' -f2,4 output: cd:gh [root@alanstudio]# diff file1 file2 compare with two files[root@alanstudio]# du -sh ./* show summary of files/folder size in current directory[root@alanstudio]# du -h > list.txt show each files/folder size in current directory and write in list.txt[root@alanstudio]# file xyz.dat dtermine the file type[root@alanstudio]# find /home -name 'index.htm' Find all path of file in /home[root@alanstudio]# find /home -name '*index*' Find all path of any file related to "index" in /home[root@alanstudio]# grep -ir "word" * Show the lines include "word" within all files in current directory[root@alanstudio]# grep -v word file1 Show the lines exclude word in file1[root@alanstudio]# ll -tr List the files/folders in line with date sorting[root@alanstudio]# locate index.htm Locate all path of fileIf out of database, use command updatedb [root@alanstudio]# ls -a -l (line list) -a (all files) -h (show size for human) [root@alanstudio]# sort index.htm sort lines of text files-n (numeric sort) -r (reverse) Server is hosted by Alanstudio Linux Operating System Recommend screen resolution 1024 x 768 / IE / FireFox Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved. |