Está en la página 1de 3

/-> root partition and # -> root user are different. /etc is the very impt directory.

ls cmd will be stored in /bin /home dir - user accounts will be stored. /sc - very specific to the applications /lib --> Library files r very impt for few of the cmds to work. Sometimes the li brary cmds store in /usr as well. /usr --> /bin & /lib sometimes can be stored under /usr. /PROC --> have lot of subdirectories with some numbers. this gives detailed pic of all the active processor that r running on the system. Any pgm actively running could be like me mory utilization,virtual memory etc. /tmp --> temporary files will be stored. don't delete the files under /tmp. ls -l --> long listing touch --> cmd to create / write a file ls -a --> can hide a file ls -al --> show all the hidden file pretend with a . will make it as a hidden file mv filename# .filename# --> will make the filename# hidden find "where to find" -name "what is the file*log*" --> on the particular directo ry cmd to find a file from the system --> find galaxy scadm$ ls -l *.log --> all files that have .log will be displayed on the present directory grep --> impt cmd to find file and also to find content that has inside the file . I/p to grep is a |-pipe cmd. galaxy scadm$ ls -l | grep log --> list out files which has "log" but it is a ca se sensitive ls cmd also can be used to find a file. ls -lR / | grep -i "file to be found" --> in-case sensitive Steps to find a file that have log that are generated on 2011 and not on 2012: ls -lR / | grep -i log | grep -v 2012 only list the files which are generated on 2011. grep reset /var/adm/messages grep -ic "reset | memory " ls -l | grep -cv "dir/file" | wc -l ls -l | grep "^d" --> this cmd will list out the directories under current direc tory. ^--> represent 1st column. ls -l | grep "^ -" --> this cmd will list the files under current directory. ls -l | grep "\-" --> this cmd also can be used to list out the files under curr ent directory.

Find number of folders created on a specific date: ls -l | grep "^d" | grep "2012-10-12" | wc -l

du -h --> disk utilization ls -l | grep "log$"---> $ means the log file which is pretend on the last line. Find the files created on 12th oct and 13th ls -l | grep "^-" | grep "2012-10-12, 2012-10-13" awk--> ls -l | grep "^d" | awk '{print $9}' --> 9 is the column number which has the di rectory/file name. ls -l | grep "^d" | awk '{print $8,$9}' ls -l | grep "^d" | awk '{print $8" "$NF}' - $NF will list out the last column

find /.name"a*" CTRL+Z $jobs bg --> resuming the background. Suspended job to bring into foreground do --> fg ls -lR / | more $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Ctrl-S ---> Scroll Lock Ctrl-Q ---> to quit ctrl-S Ctrl-Z ---> Suspend. what ever cmd running on the screen, ctrl-Z will suspend th e command. jobs ---> Any pgms that is running in the background Ctrl-C --->

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ps -a --> list out all active processes in the s/m xargs--->

ls -l xlog | grep gcmgr | awk '{print $1}' | xarg kill

También podría gustarte