/sbin/ifconfig = network info

/sbin/lspci | grep -i vga = graphics card info

strings /bin/ls | grep -i libc = finds all occurrences of libc in ls

strings /bin/ls = lists all ASCII text in ls

su -c ‘gedit /etc/yum.conf’ = opens yum.conf file in gedit

tail -3 ok = last 3 lines from a file named ok

tail -6 .bash_history = last 6 commands

tail -5 filename.txt = prints last 5 lines of the file to the screen

tail -n 5 filename.txt = prints last 5 lines of the file

tail -f /var/log/messages = updates size of text file as it gets bigger

tail -f /var/log/messages = displays system messages live

tail -f /var/log/maillog = displays mail server messages live

tail -f /var/log/httpd/access_log = displays web server messages live

tar cvf abc.tar abc.txt = tars a file with verbose

tar xvf abc.tar = untars a file with verbose

tar c abc.txt | gzip -c > abc.tar.gz = archives file and zips a file (two steps)

tar czf abc.tar.gz abc.txt = archieves and zips a file (one step, z = unzip, c = create)

tar czvf abc.tar.gz abc.txt = archieves and zips a file with verbose

tar cjvf abc.tar.bz2 abc.txt = archieves and zips a file with bzip2

tar xzvf abc.tar.gz = unzips and untars file (one step, x = untar)

tar xjvf abc.tar.bz2 = unzips and untars file (one step, j = bzip2)

time = prints current time

time yum/command name = command’s excution time

top = lists process with cpu usage

top -d 5 = changes update delay to 5 seconds (from default 3)

top -u james = process info for user james

top -p 190,2690 = process for for id 190 and 2690

top -n 10 = refreshs the screen 10 times before quitting

top -b = runs in non-interative non-screen-oriented mode

touch name.txt = creates a file named name.txt

touch /var/log/btmp = enables recording of bad attempts

tree -dx = directory structure of the os

type php = path of executables/shell commands

Leave a Reply

Your email address will not be published. Required fields are marked *