{"id":1826,"date":"2014-08-06T08:12:56","date_gmt":"2014-08-06T08:12:56","guid":{"rendered":"http:\/\/www.msinterdev.org\/wp\/2014\/08\/06\/xnix-commands-list-3\/"},"modified":"2014-08-06T08:12:56","modified_gmt":"2014-08-06T08:12:56","slug":"xnix-commands-list-3","status":"publish","type":"post","link":"http:\/\/www.msinterdev.org\/wp\/2014\/08\/06\/xnix-commands-list-3\/","title":{"rendered":"xNIX commands list -3"},"content":{"rendered":"<p>\/sbin\/ifconfig = network info<br \/>\n<br \/>\/sbin\/lspci | grep -i vga = graphics card info<\/p>\n<p>strings \/bin\/ls | grep -i libc = finds all occurrences of libc in ls<br \/>\n<br \/>strings \/bin\/ls = lists all ASCII text in ls<br \/>\n<br \/>su -c &#8216;gedit \/etc\/yum.conf&#8217; = opens yum.conf file in gedit<\/p>\n<p>tail -3 ok = last 3 lines from a file named ok<br \/>\n<br \/>tail -6 .bash_history = last 6 commands<br \/>\n<br \/>tail -5 filename.txt = prints last 5 lines of the file to the screen<br \/>\n<br \/>tail -n 5 filename.txt = prints last 5 lines of the file<br \/>\n<br \/>tail -f \/var\/log\/messages = updates size of text file as it gets bigger<br \/>\n<br \/>tail -f \/var\/log\/messages  = displays system messages live<br \/>\n<br \/>tail -f \/var\/log\/maillog = displays mail server messages live<br \/>\n<br \/>tail -f \/var\/log\/httpd\/access_log = displays web server messages live<\/p>\n<p>tar cvf abc.tar abc.txt = tars a file with verbose<br \/>\n<br \/>tar xvf abc.tar = untars a file with verbose<br \/>\n<br \/>tar c abc.txt | gzip -c &gt; abc.tar.gz = archives file and zips a file (two steps)<br \/>\n<br \/>tar czf abc.tar.gz abc.txt = archieves and zips a file (one step, z = unzip, c = create)<br \/>\n<br \/>tar czvf abc.tar.gz abc.txt = archieves and zips a file with verbose<br \/>\n<br \/>tar cjvf abc.tar.bz2 abc.txt = archieves and zips a file with bzip2<br \/>\n<br \/>tar xzvf abc.tar.gz = unzips and untars file (one step, x = untar)<br \/>\n<br \/>tar xjvf abc.tar.bz2 = unzips and untars file (one step, j = bzip2)<\/p>\n<p>time = prints current time<br \/>\n<br \/>time yum\/command name = command&#8217;s excution time<br \/>\n<br \/>top = lists process with cpu usage<br \/>\n<br \/>top -d 5 = changes update delay to 5 seconds (from default 3)<br \/>\n<br \/>top -u james = process info for user james<br \/>\n<br \/>top -p 190,2690 = process for for id 190 and 2690<br \/>\n<br \/>top -n 10 = refreshs the screen 10 times before quitting<br \/>\n<br \/>top -b = runs in non-interative non-screen-oriented mode<br \/>\n<br \/>touch name.txt = creates a file named name.txt<br \/>\n<br \/>touch \/var\/log\/btmp = enables recording of bad attempts<br \/>\n<br \/>tree -dx = directory structure of the os<br \/>\n<br \/>type php = path of executables\/shell commands<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/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 &#8216;gedit \/etc\/yum.conf&#8217; = opens yum.conf file in gedit tail -3 ok = last 3 lines from a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-1826","post","type-post","status-publish","format-standard","hentry","category-about-knowledge-os_linux"],"_links":{"self":[{"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/posts\/1826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/comments?post=1826"}],"version-history":[{"count":0,"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/posts\/1826\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/media?parent=1826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/categories?post=1826"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.msinterdev.org\/wp\/wp-json\/wp\/v2\/tags?post=1826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}