<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zen Dzign &#187; command line</title>
	<atom:link href="http://www.zendzign.com/tag/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zendzign.com</link>
	<description>The official ZZ Servers Blog - Visit http://www.zzservers.com for your business hosting needs.</description>
	<lastBuildDate>Thu, 26 Jan 2012 05:59:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Useful Commands For The Linux Command Line</title>
		<link>http://www.zendzign.com/2008/05/useful-commands-for-the-linux-command-line/</link>
		<comments>http://www.zendzign.com/2008/05/useful-commands-for-the-linux-command-line/#comments</comments>
		<pubDate>Fri, 09 May 2008 18:13:43 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://zendzign.com/?p=6</guid>
		<description><![CDATA[This short guide shows some important commands for your daily work on the Linux command line. arch Outputs the processor architecture. $ arch i686 cat Outputs the contents of a file. $ cat lorem.txt Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim [...]]]></description>
			<content:encoded><![CDATA[<p>This short guide shows some important commands for your daily work on the Linux command line.</p>
<p><span id="more-6"></span></p>
<h3>arch</h3>
<p>Outputs the processor architecture.</p>
<p>$ arch</p>
<p>i686</p>
<h3>cat</h3>
<p>Outputs the contents of a file.</p>
<p>$ cat lorem.txt</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<h3>cd</h3>
<p>Change the working directory.</p>
<p>$ cd /bin</p>
<h3>chgrp</h3>
<p>Change group ownership of files.</p>
<p>$ chgrp games moo.txt</p>
<h3>chmod</h3>
<p>Change access permissions of files.</p>
<p>$ chmod +x helloworld</p>
<h3>chown</h3>
<p>Change file owner and group.</p>
<p># chown root lorem.txt</p>
<h3>cksum</h3>
<p>Print CRC checksum and byte counts of each file.</p>
<p>$ cksum lorem.txt moo.txt</p>
<p>3570240675 453 lorem.txt</p>
<p>4294967295 0 moo.txt</p>
<h3>cp</h3>
<p>Copies a file.</p>
<p>$ cp lorem.txt copy_of_lorem.txt</p>
<h3>date</h3>
<p>Outputs the current date and time.</p>
<p>$ date</p>
<p>Sat Mar 3 12:07:09 GMT 2007</p>
<h3>df</h3>
<p>Reports the amount of disk space used and available on filesystems.</p>
<p>$ df</p>
<p>Filesystem 1K-blocks Used Available Use% Mounted on&lt;br&gt;</p>
<p>/dev/simfs 39845888 218048 39627840 1% /</p>
<h3>dir</h3>
<p>List directory contents.</p>
<p>$ dir</p>
<p>copy_of_lorem.txt lorem.txt moo.txt www</p>
<h3>du</h3>
<p>Estimate file space usage.</p>
<p>$ du -h /bin</p>
<p>7.8M /bin</p>
<h3>echo</h3>
<p>Display a line of text.</p>
<p>$ echo foobar</p>
<p>foobar</p>
<h3>exit</h3>
<p>Cause the shell to exit.</p>
<p>$ exit</p>
<h3>fgrep</h3>
<p>Print lines matching a pattern in a file.</p>
<p>$ fgrep &#8220;irure dolor&#8221; lorem.txt</p>
<p>commodo consequat. Duis aute irure dolor in reprehenderit in voluptate</p>
<h3>find</h3>
<p>Search for files in a directory hierarchy.</p>
<p>$ find hello*</p>
<p>hello_world</p>
<p>hello_world.c</p>
<h3>free</h3>
<p>Display amount of free and used memory in the system.</p>
<p>$ free</p>
<p>total used free shared buffers cached</p>
<p>Mem: 8299892 8287708 12184 0 2641772 1731236</p>
<p>Low: 3581300 3572764 8536</p>
<p>High: 4718592 4714944 3648</p>
<p>-/+ buffers/cache: 3914700 4385192</p>
<p>Swap: 8193140 2335664 5857476</p>
<h3>grep</h3>
<p>Print lines matching a pattern.</p>
<p>$ grep -i apple fruitlist.txt</p>
<p>apple</p>
<h3>groups</h3>
<p>Outputs the user groups of which your account belongs to.</p>
<p>$ groups</p>
<p>games users</p>
<h3>head</h3>
<p>Output the first part of files.</p>
<p>$ head -2 lorem.txt</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</p>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim</p>
<h3>hostname</h3>
<p>Outputs the machines hostname on the network.</p>
<p>$ hostname</p>
<p>anapnea.net</p>
<h3>id</h3>
<p>Outputs user id, group id, and groups of your account.</p>
<p>$ id</p>
<p>uid=1478(smallfoot) gid=100(users) groups=35(games),100(users)</p>
<h3>kill</h3>
<p>End a process.</p>
<p>$ kill -9 18298</p>
<p>-bash: kill: (18298) &#8211; Operation not permitted</p>
<h3>killall</h3>
<p>Kill processes by name.</p>
<p>$ killall irssi</p>
<p>irssi(18298): Operation not permitted</p>
<p>irssi(13372): Operation not permitted</p>
<p>irssi(22048): Operation not permitted</p>
<p>irssi: no process killed</p>
<h3>last</h3>
<p>Show listing of last logged in users.</p>
<p>$ last -n 3</p>
<p>alice pts/6 192.0.34.166 Fri May 18 16:17 still logged in</p>
<p>bob pts/2 64.233.183.103 Fri May 18 16:17 still logged in</p>
<p>clare pts/6 72.5.124.61 Fri May 18 15:54 &#8211; 15:55 (00:01)</p>
<h3>ldd</h3>
<p>Print shared library dependencies.</p>
<p>$ ldd /bin/bash</p>
<p>libncurses.so.5 =&gt; /lib/libncurses.so.5 (0&#215;40023000)</p>
<p>libdl.so.2 =&gt; /lib/libdl.so.2 (0&#215;40065000)</p>
<p>libc.so.6 =&gt; /lib/libc.so.6 (0&#215;40069000)</p>
<p>/lib/ld-linux.so.2 (0&#215;40000000)</p>
<h3>ln</h3>
<p>Make links between files.</p>
<p>$ ln -s data.txt symlink.txt</p>
<h3>logname</h3>
<p>Print user&#8217;s login name.</p>
<p>$ logname</p>
<p>smallfoot</p>
<h3>ls</h3>
<p>List directory contents.</p>
<p>$ ls</p>
<p>copy_of_lorem.txt lorem.txt moo.txt www</p>
<h3>man</h3>
<p>Opens the manual page for a software or function.</p>
<p>$ man bash</p>
<h3>md5sum</h3>
<p>Outputs the MD5 hash sum of a file.</p>
<p>$ md5sum lorem.txt</p>
<p>56da9e37259af34345895883e6fd1a27 lorem.txt</p>
<h3>mkdir</h3>
<p>Makes a directory.</p>
<p>$ mkdir foobar</p>
<h3>mv</h3>
<p>Moves a file.</p>
<p>$ mv lorem.txt ipsum.txt</p>
<h3>nl</h3>
<p>Number lines of files.</p>
<p>$ nl lorem.txt</p>
<p>1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</p>
<p>2 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim</p>
<p>3 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea</p>
<p>4 commodo consequat. Duis aute irure dolor in reprehenderit in voluptate</p>
<p>5 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint</p>
<p>6 occaecat cupidatat non proident, sunt in culpa qui officia deserunt</p>
<p>7 mollit anim id est laborum.</p>
<h3>nm</h3>
<p>List symbols from object files.</p>
<p>$ nm hello_world</p>
<p>080494a0 D _DYNAMIC</p>
<p>0804956c D _GLOBAL_OFFSET_TABLE_</p>
<p>08048474 R _IO_stdin_used</p>
<p>w _Jv_RegisterClasses</p>
<p>08049490 d __CTOR_END__</p>
<p>0804948c d __CTOR_LIST__</p>
<p>08049498 d __DTOR_END__</p>
<p>&#8230;</p>
<h3>od</h3>
<p>Dump files in octal and other formats.</p>
<p>$ od -t x /bin/sh</p>
<p>2376640 00098020 000054d4 00000000 00000000</p>
<p>2376660 00000020 00000000 000000c7 00000008</p>
<p>2376700 00000003 080e6500 0009d4f4 00004ae8</p>
<p>&#8230;</p>
<h3>pidof</h3>
<p>Find the process ID of a running program.</p>
<p>$ pidof fetchmail</p>
<p>22392</p>
<h3>ping</h3>
<p>Pings a host.</p>
<p>$ ping -c 2 127.0.0.1</p>
<p>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.</p>
<p>64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms</p>
<p>64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.052 ms</p>
<p>&#8212; 127.0.0.1 ping statistics &#8212;</p>
<p>2 packets transmitted, 2 received, 0% packet loss, time 999ms</p>
<p>rtt min/avg/max/mdev = 0.048/0.050/0.052/0.002 ms</p>
<h3>ps</h3>
<p>Outputs running processes.</p>
<p>$ ps</p>
<p>PID TTY TIME CMD</p>
<p>21542 pts/12 00:00:00 bash</p>
<p>27706 pts/12 00:00:00 ps</p>
<h3>pstree</h3>
<p>Display a tree of processes.</p>
<p>$ pstree</p>
<p>init-+-2*[BitchX]</p>
<p>|-3*[bash---sleep]</p>
<p>|-fetchmail</p>
<p>|-screen-+-bash&#8212;irssi</p>
<p>| `-bash&#8212;ctorrent</p>
<p>|-screen-+-bash&#8212;lisp.run</p>
<p>| |-bash&#8212;vi</p>
<p>| |-2*[bash]</p>
<p>| `-bash&#8212;lynx</p>
<p>|-2*[screen---bash---irssi]</p>
<p>|-screen&#8212;irssi</p>
<p>|-screen&#8212;bash</p>
<p>|-screen-+-bash</p>
<p>| `-irssi</p>
<p>|-skjerm&#8212;irssi</p>
<p>|-sshd-+-5*[sshd---sshd---bash---irssi]</p>
<p>| |-8*[sshd---sshd---bash]</p>
<p>| |-sshd&#8212;sshd&#8212;bash&#8212;screen</p>
<p>| |-sshd&#8212;sshd</p>
<p>| `-sshd&#8212;sshd&#8212;bash&#8212;pstree</p>
<p>`-syslog-ng</p>
<h3>pwd</h3>
<p>Outputs the name of current working directory.</p>
<p>$ pwd</p>
<p>/home/smallfoot</p>
<h3>rm</h3>
<p>Removes a file or directory.</p>
<p>$ rm lorem.txt</p>
<h3>rmdir</h3>
<p>Removes a directory.</p>
<p>$ rmdir foobar</p>
<h3>sed</h3>
<p>Stream editor for filtering and transforming text.</p>
<p>$ echo &#8220;My cat&#8217;s name is Bob&#8221; | sed -e &#8216;s/Bob/Mittens/g&#8217;</p>
<p>My cat&#8217;s name is Mittens</p>
<h3>sha1sum</h3>
<p>Outputs the SHA1 hash sum of a file.</p>
<p>$ sha1sum lorem.txt</p>
<p>c942ddebd142ec8bacac9213d48096e74bab4957 lorem.txt</p>
<h3>shutdown</h3>
<p>Bring the system down in a secure way. All logged-in users are notified that the system is going down.</p>
<p>$ shutdown now</p>
<h3>size</h3>
<p>List section sizes and total size.</p>
<p>$ size /bin/bash</p>
<p>text data bss dec hex filename</p>
<p>621233 22712 19176 663121 a1e51 /bin/bash</p>
<h3>stat</h3>
<p>Outputs file status.</p>
<p>$ stat lorem.txt</p>
<p>File: `lorem.txt&#8217;</p>
<p>Size: 453 Blocks: 8 IO Block: 4096 regular file</p>
<p>Device: 77h/119d Inode: 27312217 Links: 1</p>
<p>Access: (0644/-rw-r&#8211;r&#8211;) Uid: ( 1478/smallfoot) Gid: ( 100/ users)</p>
<p>Access: 2007-03-03 12:24:39.000000000 +0000</p>
<p>Modify: 2007-03-03 12:24:39.000000000 +0000</p>
<p>Change: 2007-03-03 12:24:39.000000000 +0000</p>
<h3>strings</h3>
<p>Print the strings of printable characters in files.</p>
<p>$ strings hello_world</p>
<p>/lib/ld-linux.so.2</p>
<p>_Jv_RegisterClasses</p>
<p>__gmon_start__</p>
<p>libc.so.6</p>
<p>puts</p>
<p>_IO_stdin_used</p>
<p>__libc_start_main</p>
<p>GLIBC_2.0</p>
<p>PTRh%</p>
<p>[^_]</p>
<p>Hello World!</p>
<h3>tail</h3>
<p>Output the last part of files.</p>
<p>$ tail -2 lorem.txt</p>
<p>occaecat cupidatat non proident, sunt in culpa qui officia deserunt</p>
<p>mollit anim id est laborum.</p>
<h3>talk</h3>
<p>Talk to another user.</p>
<p>$ talk bob Lookout for the dopefish!</p>
<h3>touch</h3>
<p>Change a file&#8217;s access and modification timestamps. If file does not exist, create it.</p>
<p>$ touch lorem.txt</p>
<h3>tty</h3>
<p>Outputs the name of the current terminal.</p>
<p>$ tty</p>
<p>/dev/pts/16</p>
<h3>uname</h3>
<p>Outputs operating system, hostname, kernel version, date and timp, and processor.</p>
<p>$ uname -a</p>
<p>Linux anapnea.net 2.6.9 #1 SMP Wed Jul 19 16:24:18 MSD 2006 i686 Intel(R) Xeon(TM) CPU 2.80GHz GenuineIntel GNU/Linux</p>
<h3>uptime</h3>
<p>Outputs the system uptime.</p>
<p>$ uptime</p>
<p>14:50:26 up 7 days, 17:52, 18 users, load average: 0.08, 0.02, 0.01</p>
<h3>users</h3>
<p>Print the user names of users currently logged in to the current host.</p>
<p>$ users</p>
<p>alice bob charlie eve</p>
<h3>vdir</h3>
<p>List directory contents.</p>
<p>$ vdir</p>
<p>total 8</p>
<p>-rw-r&#8211;r&#8211; 1 smallfoot users 453 Mar 3 12:32 copy_of_lorem.txt</p>
<p>-rw-r&#8211;r&#8211; 1 smallfoot users 453 Mar 3 12:24 lorem.txt</p>
<p>-rw-r&#8211;r&#8211; 1 smallfoot users 0 Mar 3 12:32 moo.txt</p>
<p>lrwxr-xr-x 1 root root 18 Feb 27 19:33 www -&gt; /var/www/smallfoot</p>
<h3>w</h3>
<p>Show who is logged on and what they are doing.</p>
<p>$ w</p>
<p>12:14:30 up 5 days, 15:16, 19 users, load average: 0.00, 0.00, 0.00</p>
<p>USER TTY LOGIN@ IDLE JCPU PCPU WHAT</p>
<p>charlie pts/0 Fri21 3:26m 2.52s 2.52s irssi</p>
<p>alice pts/2 Wed17 30:21m 0.00s 0.00s -bash</p>
<p>emma pts/4 11:37 36:57 0.00s 0.00s -bash</p>
<p>frank pts/5 11:48 11:03 0.00s 0.00s -bash</p>
<p>smallfoo pts/12 12:01 0.00s 0.04s 0.01s w</p>
<h3>wall</h3>
<p>Send a message to everybody&#8217;s terminal.</p>
<p>$ wall next week we change the server for a new one</p>
<h3>wc</h3>
<p>Counts lines in a file.</p>
<p>$ wc -l lorem.txt</p>
<p>7 lorem.txt</p>
<h3>whatis</h3>
<p>Search the whatis database for complete words.</p>
<p>$ whatis bash</p>
<p>bash (1) &#8211; GNU Bourne-Again SHell</p>
<p>bash [builtins] (1) &#8211; bash built-in commands, see bash(1)</p>
<h3>who</h3>
<p>Outputs who is currently logged into the system.</p>
<p>$ who</p>
<p>charlie pts/0 Mar 2 21:37 (xtreme-11-65.acme.com)</p>
<p>alice pts/2 Feb 28 17:48 (147.21.16.3)</p>
<p>emma pts/4 Mar 3 11:37 (32.84-48-181.uac.com)</p>
<p>frank pts/5 Mar 3 11:48 (port-212-202-233-2.foobar.org)</p>
<p>smallfoot pts/12 Mar 3 12:01 (c-12776f4.cust.example.net)</p>
<h3>whereis</h3>
<p>Locate the binary, source, and manual page files for a command.</p>
<p>$ whereis bash</p>
<p>bash: /bin/bash /etc/bash /usr/share/man/man1/bash.1.gz</p>
<h3>whoami</h3>
<p>Outputs your username / the name of your account.</p>
<p>$ whoami</p>
<p>smallfoot</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2008/05/useful-commands-for-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

