<?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>Johan Känngård &#187; reference</title>
	<atom:link href="http://johankanngard.net/tag/reference/feed/" rel="self" type="application/rss+xml" />
	<link>http://johankanngard.net</link>
	<description>Useful tips for developers</description>
	<lastBuildDate>Fri, 06 Aug 2010 13:49:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Bash Variables Cheat Sheet</title>
		<link>http://johankanngard.net/2008/07/31/bash-variables-cheat-sheet/</link>
		<comments>http://johankanngard.net/2008/07/31/bash-variables-cheat-sheet/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 08:49:34 +0000</pubDate>
		<dc:creator>Johan Känngård</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://johankanngard.net/?p=248</guid>
		<description><![CDATA[For a complete list, see Bash Reference Manual &#8211; Bash Environment Variables. This is just my own memory-dump. To get the value of a variable, you can use: echo $OLDPWD OLDPWD previous current directory PWD current directory LANG the language used by programs, check with locale -a for available locales. Can be set in .bash_profile [...]]]></description>
			<content:encoded><![CDATA[<p>
For a complete list, see <a href="http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#Bash-Variables">Bash Reference Manual &#8211; Bash Environment Variables</a>. This is just my own memory-dump. To get the value of a variable, you can use:<br />
<code><br />
echo $OLDPWD<br />
</code>
</p>
<dl>
<dt>OLDPWD</dt>
<dd>previous current directory</dd>
<dt>PWD</dt>
<dd>current directory</dd>
<dt>LANG</dt>
<dd>the language used by programs, check with locale -a for available locales. Can be set in .bash_profile with export LANG=&#8221;en_US.utf8&#8243;</dd>
<dt>LANGUAGE</dt>
<dd>the language used by programs, check with locale- a for available locales. Can be set in .bash_profile with export LANGUAGE=&#8221;en_US.utf8&#8243;</dd>
<dt>RSYNC_RSH</dt>
<dd>the shell used for rsync, usually /usr/bin/ssh</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://johankanngard.net/2008/07/31/bash-variables-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Commands Cheat Sheet</title>
		<link>http://johankanngard.net/2008/07/31/linux-commands-cheat-sheet/</link>
		<comments>http://johankanngard.net/2008/07/31/linux-commands-cheat-sheet/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 07:48:45 +0000</pubDate>
		<dc:creator>Johan Känngård</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://johankanngard.net/?p=229</guid>
		<description><![CDATA[There are a lot of these on the net. Why not one more? :-) I will try to keep this updated. Some commands are shell-specific (I use bash), and some are application specific, like the Apache commands. a2enmod enable apache module a2dismod disable apache module a2ensite enable apache site a2dissite disable apache site apt-get upgrades [...]]]></description>
			<content:encoded><![CDATA[<p>
There are a lot of these on the net. Why not one more? :-) I will try to keep this updated. Some commands are shell-specific (I use bash), and some are application specific, like the Apache commands.
</p>
<dl>
<dt>a2enmod</dt>
<dd>enable apache module</dd>
<dt>a2dismod</dt>
<dd>disable apache module</dd>
<dt>a2ensite</dt>
<dd>enable apache site</dd>
<dt>a2dissite</dt>
<dd>disable apache site</dd>
<dt>apt-get</dt>
<dd>upgrades Debian/Ubuntu. Do sudo apt-get update first to update info, then sudo apt-get upgrade to get new version of installed files. To install a specific package, use sudo apt-get install foo, where foo is the package name.</dd>
<dt>alias</dt>
<dd>creates an alias of a command in the shell</dd>
<dt>awk</dt>
<dd>see gawk</dd>
<dt>cat</dt>
<dd>show / concatenates files</dd>
<dt>cd <directory></dt>
<dd>change current directory</dd>
<dt>cd ~ / cd</dt>
<dd>go to home directory</dd>
<dt>cd -</dt>
<dd>go to previous directory</dd>
<dt>chgrp</dt>
<dd>changes a group of a file</dd>
<dt>chmod</dt>
<dd>changes the access rights of a file</dd>
<dt>chown</dt>
<dd>changes owner of a file</dd>
<dt>clear</dt>
<dd>clears the screen</dd>
<dt>cp</dt>
<dd>copies files</dd>
<dt>cut</dt>
<dd>cuts lines into (like @SubSet in @Forula)</dd>
<dt>date</dt>
<dd>shows the time and date</dd>
<dt>dd</dt>
<dd>convert and copy files</dd>
<dt>df</dt>
<dd>disk / partition info</dd>
<dt>dhclient</dt>
<dd>dhcp-client, use dhclient -r to release, and only dhclient to renew</dd>
<dt>dig</dt>
<dd>DNS entries</dd>
<dt>du</dt>
<dd>show directory / file sizes, use du -sh / to show total size and in &#8220;human-readable&#8221; form.</dd>
<dt>echo</dt>
<dd>prints characters</dd>
<dt>ed</dt>
<dd>text editor</dd>
<dt>emacs</dt>
<dd>text editor</dd>
<dt>exit</dt>
<dd>logs out (also CTRL-D)</dd>
<dt>fdisk</dt>
<dd>disk handling. Can list devices via fdisk -l</dd>
<dt>fg</dt>
<dd>moves a background program to the foreground</dd>
<dt>find</dt>
<dd>find files in the filesystem. Go to the directory where you want to find the file, use &#8220;find -name hosts&#8221; to find files named hosts.</dd>
<dt>ftp</dt>
<dd>file transfer utility (use scp or sftp instead)</dd>
<dt>fsck</dt>
<dd>filesystem check</dd>
<dt>fuser</dt>
<dd>shows who and what process is using a specific file or file system. Good when you want to unmount a drive. For example, fuser /media/cdrom shows the process and user that is using the cdrom and fuser -k /media/cdrom kills the associated process</dd>
<dt>gawk</dt>
<dd>reads records and fields from a file. Or words.</dd>
<dt>gpasswd</dt>
<dd>manages /etc/group</dd>
<dt>grep</dt>
<dd>searches a file for a regular expression pattern. grep -ir &#8216;johan&#8217; .finds all files with the text johan, case insensitive and recursively</dd>
<dt>groupadd</dt>
<dd>adds a group</dd>
<dt>groupdel</dt>
<dd>deletes a group</dd>
<dt>gzip</dt>
<dd>compresses files</dd>
<dt>hcitool</dt>
<dd>configures BlueTooth connections. Use hcitool search to search for discoverable BlueTooth devices.</dd>
<dt>hidd</dt>
<dd>BlueTooth HID daemon. Use sudo hidd &#8211;connect XX:XX:XX:XX:XX:XX to connecto to a HID device</dd>
<dt>id</dt>
<dd>see your user id and group id&#8217;s</dd>
<dt>ifconfig</dt>
<dd>network configuration</dd>
<dt>info</dt>
<dd>show textinfo files</dd>
<dt>jobs</dt>
<dd>lists active jobs</dd>
<dt>kill</dt>
<dd>kills a process, use kill %jobno to kill a job. Some jobs may not respond to normal kill, you must use kill -KILL %jobno</dd>
<dt>less</dt>
<dd>show contents of files (backward / forward)</dd>
<dt>ln</dt>
<dd>creates a link between files</dd>
<dt>locate</dt>
<dd>find files in index</dd>
<dt>logout</dt>
<dd>logs out (also CTRL-D) or exit</dd>
<dt>ls</dt>
<dd>list files / directory</dd>
<dt>lshal</dt>
<dd>list HAL devices</dd>
<dt>lspci</dt>
<dd>list PCI devices</dd>
<dt>lsusb</dt>
<dd>list USB devices</dd>
<dt>mail</dt>
<dd>starts the mail program</dd>
<dt>man</dt>
<dd>shows manual page for a command</dd>
<dt>mkdir</dt>
<dd>creates a directory</dd>
<dt>mke2fs</dt>
<dd>formats drives</dd>
<dt>mkswap</dt>
<dd>sets up a swap partition</dd>
<dt>more</dt>
<dd>show contents of files (only forward)</dd>
<dt>mount</dt>
<dd>mounts a filesystem</dd>
<dt>mv</dt>
<dd>move or rename</dd>
<dt>nano</dt>
<dd>text editor</dd>
<dt>netstat</dt>
<dd>shows network connections</dd>
<dt>nice</dt>
<dd>handles process priority</dd>
<dt>ping</dt>
<dd>pings a host</dd>
<dt>procinfo</dt>
<dd>shows memory usage</dd>
<dt>ps</dt>
<dd>process status</dd>
<dt>pwd</dt>
<dd>print working directory</dd>
<dt>rm</dt>
<dd>removes a file</dd>
<dt>rmdir</dt>
<dd>removes a directory</dd>
<dt>passwd</dt>
<dd>sets log in passwd</dd>
<dt>route</dt>
<dd>set the ip routes</dd>
<dt>run-parts</dt>
<dd>runs all commands in a directory</dd>
<dt>scp</dt>
<dd>secure copy via ssh. Use &#8221; and \ to escape filenames with spaces, like this: &#8220;HOWTO\ Create\ SSH\ Keys.txt&#8221;</dd>
<dt>sftp</dt>
<dd>secure file transfer (use scp if possible instead)</dd>
<dt>sed</dt>
<dd>stream editor, replaces strings in streams. Example cat test.txt | sed s/testing/helloworld/, replaces testing with helloworld in text.txt to stdout.</dd>
<dt>sensors</dt>
<dd>to read temperatures on motherboard, cpu etc.</dd>
<dt>shutdown</dt>
<dd>in SU mode, shutdowns the system, sudo shutdown -r now restarts the system.</dd>
<dt>sleep</dt>
<dd>sleeps the specified amount of time</dd>
<dt>sort</dt>
<dd>sorts the contents of a file</dd>
<dt>ssh</dt>
<dd>secure shell, use it like this: ssh username@host</dd>
<dt>su</dt>
<dd>goes to &#8220;super user mode&#8221; = root. In Ubuntu you have to set a root password first.</dd>
<dt>sudo</dt>
<dd>goes to &#8220;super user mode&#8221; on one command</dd>
<dt>swapon</dt>
<dd>activates a swap area</dd>
<dt>tar</dt>
<dd>binary to ascii encoder</dd>
<dt>telnet</dt>
<dd>telnet session, unsecure, use ssh instead.</dd>
<dt>top</dt>
<dd>monitors processes</dd>
<dt>touch</dt>
<dd>creates a new empty file or changes the date of an existing file</dd>
<dt>traceroute</dt>
<dd>traces ip hosts</dd>
<dt>tree</dt>
<dd>shows a tree of the filesystem</dd>
<dt>umount</dt>
<dd>umounts a filesystem</dd>
<dt>unalias</dt>
<dd>removes an alias</dd>
<dt>uname</dt>
<dd>shows information about the current system</dd>
<dt>unzip</dt>
<dd>decompresses ZIP files</dd>
<dt>update-rc.d</dt>
<dd>adds something to startup (Debian)</dd>
<dt>uptime</dt>
<dd>shows the uptime for the server</dd>
<dt>useradd</dt>
<dd>add a user</dd>
<dt>userdel</dt>
<dd>remove a user</dd>
<dt>usermod</dt>
<dd>modify a user</dd>
<dt>users</dt>
<dd>lists the users currently logged into the computer</dd>
<dt>vi</dt>
<dd>text editor</dd>
<dt>vmstat</dt>
<dd>shows memory usage</dd>
<dt>w</dt>
<dd>shows who are logged on and what they are doing</dd>
<dt>wait</dt>
<dd>waits for a job to finish</dd>
<dt>watch</dt>
<dd>runs a command every 2 seconds until CTRL+C</dd>
<dt>wc</dt>
<dd>word count. Also count lines</dd>
<dt>whatis</dt>
<dd>short explanation of command</dd>
<dt>whereis</dt>
<dd>shows where the specified command is and its related files</dd>
<dt>which</dt>
<dd>shows the path to the specified command</dd>
<dt>who</dt>
<dd>shows who are logged on</dd>
<dt>whoami</dt>
<dd>shows what user I am</dd>
<dt>write</dt>
<dd>sends a message to another user</dd>
<dt>xviddetect</dt>
<dd>setup video card for X</dd>
<dt>Xconfigurator</dt>
<dd>setup for X</dd>
</dl>
<p>Also see the good man-page-like command list at <a href="http://www.oreillynet.com/linux/cmd/">Oreillynet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://johankanngard.net/2008/07/31/linux-commands-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
