<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Cs%3A_Tips_Linux</id>
	<title>Cs: Tips Linux - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Cs%3A_Tips_Linux"/>
	<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;action=history"/>
	<updated>2026-04-15T23:13:34Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;diff=2052&amp;oldid=prev</id>
		<title>Justine le 22 juin 2022 à 10:03</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;diff=2052&amp;oldid=prev"/>
		<updated>2022-06-22T10:03:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 22 juin 2022 à 10:03&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:cheatsheet]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Command	Description&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Command	Description&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-mediawiki:diff:1.41:old-1247:rev-2052:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;diff=1247&amp;oldid=prev</id>
		<title>Justine le 16 septembre 2019 à 20:26</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;diff=1247&amp;oldid=prev"/>
		<updated>2019-09-16T20:26:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 16 septembre 2019 à 20:26&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;lt;nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Command	Description&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Command	Description&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;•	apropos whatis	Show commands pertinent to string. See also threadsafe&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;•	apropos whatis	Show commands pertinent to string. See also threadsafe&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l210&quot;&gt;Ligne 210 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 211 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;•	links	Web browser&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;•	links	Web browser&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;•	xdg-open .	open a file or url with the registered desktop application&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;•	xdg-open .	open a file or url with the registered desktop application&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;diff=1246&amp;oldid=prev</id>
		<title>Justine : Page créée avec « Command	Description •	apropos whatis	Show commands pertinent to string. See also threadsafe •	man -t ascii | ps2pdf - &gt; ascii.pdf	make a pdf of a manual page  	which c... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cs:_Tips_Linux&amp;diff=1246&amp;oldid=prev"/>
		<updated>2019-09-16T20:25:38Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « Command	Description •	apropos whatis	Show commands pertinent to string. See also threadsafe •	man -t ascii | ps2pdf - &amp;gt; ascii.pdf	make a pdf of a manual page  	which c... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Command	Description&lt;br /&gt;
•	apropos whatis	Show commands pertinent to string. See also threadsafe&lt;br /&gt;
•	man -t ascii | ps2pdf - &amp;gt; ascii.pdf	make a pdf of a manual page&lt;br /&gt;
 	which command	Show full path name of command&lt;br /&gt;
 	time command	See how long a command takes&lt;br /&gt;
•	time cat	Start stopwatch. Ctrl-d to stop. See also sw&lt;br /&gt;
dir navigation&lt;br /&gt;
•	cd -	Go to previous directory&lt;br /&gt;
•	cd	Go to $HOME directory&lt;br /&gt;
 	(cd dir &amp;amp;&amp;amp; command)	Go to dir, execute command and return to current dir&lt;br /&gt;
•	pushd .	Put current dir on stack so you can popd back to it&lt;br /&gt;
file searching&lt;br /&gt;
•	alias l=&amp;#039;ls -l --color=auto&amp;#039;	quick dir listing. See also l&lt;br /&gt;
•	ls -lrt	List files by date. See also newest and find_mm_yyyy&lt;br /&gt;
•	ls /usr/bin | pr -T9 -W$COLUMNS	Print in 9 columns to width of terminal&lt;br /&gt;
 	find -name &amp;#039;*.[ch]&amp;#039; | xargs grep -E &amp;#039;expr&amp;#039;	Search &amp;#039;expr&amp;#039; in this dir and below. See also findrepo&lt;br /&gt;
 	find -type f -print0 | xargs -r0 grep -F &amp;#039;example&amp;#039;	Search all regular files for &amp;#039;example&amp;#039; in this dir and below&lt;br /&gt;
 	find -maxdepth 1 -type f | xargs grep -F &amp;#039;example&amp;#039;	Search all regular files for &amp;#039;example&amp;#039; in this dir&lt;br /&gt;
 	find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done	Process each item with multiple commands (in while loop)&lt;br /&gt;
•	find -type f ! -perm -444	Find files not readable by all (useful for web site)&lt;br /&gt;
•	find -type d ! -perm -111	Find dirs not accessible by all (useful for web site)&lt;br /&gt;
•	locate -r &amp;#039;file[^/]*\.txt&amp;#039;	Search cached index for names. This re is like glob *file*.txt&lt;br /&gt;
•	look reference	Quickly search (sorted) dictionary for prefix&lt;br /&gt;
•	grep --color reference /usr/share/dict/words	Highlight occurances of regular expression in dictionary&lt;br /&gt;
archives and compression&lt;br /&gt;
 	gpg -c file	Encrypt file&lt;br /&gt;
 	gpg file.gpg	Decrypt file&lt;br /&gt;
 	tar -c dir/ | bzip2 &amp;gt; dir.tar.bz2	Make compressed archive of dir/&lt;br /&gt;
 	bzip2 -dc dir.tar.bz2 | tar -x	Extract archive (use gzip instead of bzip2 for tar.gz files)&lt;br /&gt;
 	tar -c dir/ | gzip | gpg -c | ssh user@remote &amp;#039;dd of=dir.tar.gz.gpg&amp;#039;	Make encrypted archive of dir/ on remote machine&lt;br /&gt;
 	find dir/ -name &amp;#039;*.txt&amp;#039; | tar -c --files-from=- | bzip2 &amp;gt; dir_txt.tar.bz2	Make archive of subset of dir/ and below&lt;br /&gt;
 	find dir/ -name &amp;#039;*.txt&amp;#039; | xargs cp -a --target-directory=dir_txt/ --parents	Make copy of subset of dir/ and below&lt;br /&gt;
 	( tar -c /dir/to/copy ) | ( cd /where/to/ &amp;amp;&amp;amp; tar -x -p )	Copy (with permissions) copy/ dir to /where/to/ dir&lt;br /&gt;
 	( cd /dir/to/copy &amp;amp;&amp;amp; tar -c . ) | ( cd /where/to/ &amp;amp;&amp;amp; tar -x -p )	Copy (with permissions) contents of copy/ dir to /where/to/&lt;br /&gt;
 	( tar -c /dir/to/copy ) | ssh -C user@remote &amp;#039;cd /where/to/ &amp;amp;&amp;amp; tar -x -p&amp;#039; 	Copy (with permissions) copy/ dir to remote:/where/to/ dir&lt;br /&gt;
 	dd bs=1M if=/dev/sda | gzip | ssh user@remote &amp;#039;dd of=sda.gz&amp;#039;	Backup harddisk to remote machine&lt;br /&gt;
rsync (Network efficient file copier: Use the --dry-run option for testing)&lt;br /&gt;
 	rsync -P rsync://rsync.server.com/path/to/file file	Only get diffs. Do multiple times for troublesome downloads&lt;br /&gt;
 	rsync --bwlimit=1000 fromfile tofile	Locally copy with rate limit. It&amp;#039;s like nice for I/O&lt;br /&gt;
 	rsync -az -e ssh --delete ~/public_html/ remote.com:&amp;#039;~/public_html&amp;#039;	Mirror web site (using compression and encryption)&lt;br /&gt;
 	rsync -auz -e ssh remote:/dir/ . &amp;amp;&amp;amp; rsync -auz -e ssh . remote:/dir/	Synchronize current directory with remote one&lt;br /&gt;
ssh (Secure SHell)&lt;br /&gt;
 	ssh $USER@$HOST command	Run command on $HOST as $USER (default command=shell)&lt;br /&gt;
•	ssh -f -Y $USER@$HOSTNAME xeyes	Run GUI command on $HOSTNAME as $USER&lt;br /&gt;
 	scp -p -r $USER@$HOST: file dir/	Copy with permissions to $USER&amp;#039;s home directory on $HOST&lt;br /&gt;
 	scp -c arcfour $USER@$LANHOST: bigfile	Use faster crypto for local LAN. This might saturate GigE&lt;br /&gt;
 	ssh -g -L 8080:localhost:80 root@$HOST	Forward connections to $HOSTNAME:8080 out to $HOST:80&lt;br /&gt;
 	ssh -R 1434:imap:143 root@$HOST	Forward connections from $HOST:1434 in to imap:143&lt;br /&gt;
 	ssh-copy-id $USER@$HOST 	Install public key for $USER@$HOST for password-less log in&lt;br /&gt;
wget (multi purpose download tool)&lt;br /&gt;
•	(cd dir/ &amp;amp;&amp;amp; wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html)	Store local browsable version of a page to the current dir&lt;br /&gt;
 	wget -c http://www.example.com/large.file	Continue downloading a partially downloaded file&lt;br /&gt;
 	wget -r -nd -np -l1 -A &amp;#039;*.jpg&amp;#039; http://www.example.com/dir/	Download a set of files to the current directory&lt;br /&gt;
 	wget ftp://remote/file[1-9].iso/	FTP supports globbing directly&lt;br /&gt;
•	wget -q -O- http://www.pixelbeat.org/timeline.html | grep &amp;#039;a href&amp;#039; | head	Process output directly&lt;br /&gt;
 	echo &amp;#039;wget url&amp;#039; | at 01:00	Download url at 1AM to current dir&lt;br /&gt;
 	wget --limit-rate=20k url	Do a low priority download (limit to 20KB/s in this case)&lt;br /&gt;
 	wget -nv --spider --force-html -i bookmarks.html	Check links in a file&lt;br /&gt;
 	wget --mirror http://www.example.com/	Efficiently update a local copy of a site (handy from cron)&lt;br /&gt;
networking (Note ifconfig, route, mii-tool, nslookup commands are obsolete)&lt;br /&gt;
 	ethtool eth0	Show status of ethernet interface eth0&lt;br /&gt;
 	ethtool --change eth0 autoneg off speed 100 duplex full	Manually set ethernet interface speed&lt;br /&gt;
 	iw dev wlan0 link	Show link status of wireless interface wlan0&lt;br /&gt;
 	iw dev wlan0 set bitrates legacy-2.4 1	Manually set wireless interface speed&lt;br /&gt;
•	iw dev wlan0 scan	List wireless networks in range&lt;br /&gt;
•	ip link show	List network interfaces&lt;br /&gt;
 	ip link set dev eth0 name wan	Rename interface eth0 to wan&lt;br /&gt;
 	ip link set dev eth0 up	Bring interface eth0 up (or down)&lt;br /&gt;
•	ip addr show	List addresses for interfaces&lt;br /&gt;
 	ip addr add 1.2.3.4/24 brd + dev eth0	Add (or del) ip and mask (255.255.255.0)&lt;br /&gt;
•	ip route show	List routing table&lt;br /&gt;
 	ip route add default via 1.2.3.254	Set default gateway to 1.2.3.254&lt;br /&gt;
•	ss -tupl	List internet services on a system&lt;br /&gt;
•	ss -tup	List active connections to/from system&lt;br /&gt;
•	host pixelbeat.org	Lookup DNS ip address for name or vice versa&lt;br /&gt;
•	hostname -i	Lookup local ip address (equivalent to host `hostname`)&lt;br /&gt;
•	whois pixelbeat.org	Lookup whois info for hostname or ip address&lt;br /&gt;
windows networking (Note samba is the package that provides all this windows specific networking support)&lt;br /&gt;
•	smbtree	Find windows machines. See also findsmb&lt;br /&gt;
 	nmblookup -A 1.2.3.4	Find the windows (netbios) name associated with ip address&lt;br /&gt;
 	smbclient -L windows_box	List shares on windows machine or samba server&lt;br /&gt;
 	mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share	Mount a windows share&lt;br /&gt;
 	echo &amp;#039;message&amp;#039; | smbclient -M windows_box	Send popup to windows machine (off by default in XP sp2)&lt;br /&gt;
text manipulation (Note sed uses stdin and stdout. Newer versions support inplace editing with the -i option)&lt;br /&gt;
 	sed &amp;#039;s/string1/string2/g&amp;#039;	Replace string1 with string2&lt;br /&gt;
 	sed &amp;#039;s/\(.*\)1/\12/g&amp;#039;	Modify anystring1 to anystring2&lt;br /&gt;
 	sed &amp;#039;/^ *#/d; /^ *$/d&amp;#039;	Remove comments and blank lines&lt;br /&gt;
 	sed &amp;#039;:a; /\\$/N; s/\\\n//; ta&amp;#039;	Concatenate lines with trailing \&lt;br /&gt;
 	sed &amp;#039;s/[ \t]*$//&amp;#039;	Remove trailing spaces from lines&lt;br /&gt;
 	sed &amp;#039;s/\([`&amp;quot;$\]\)/\\\1/g&amp;#039;	Escape shell metacharacters active within double quotes&lt;br /&gt;
•	seq 10 | sed &amp;quot;s/^/      /; s/ *\(.\{7,\}\)/\1/&amp;quot;	Right align numbers&lt;br /&gt;
•	seq 10 | sed p | paste - -	Duplicate a column&lt;br /&gt;
 	sed -n &amp;#039;1000{p;q}&amp;#039;	Print 1000th line&lt;br /&gt;
 	sed -n &amp;#039;10,20p;20q&amp;#039;	Print lines 10 to 20&lt;br /&gt;
 	sed -n &amp;#039;s/.*&amp;lt;title&amp;gt;\(.*\)&amp;lt;\/title&amp;gt;.*/\1/ip;T;q&amp;#039;	Extract title from HTML web page&lt;br /&gt;
 	sed -i 42d ~/.ssh/known_hosts	Delete a particular line&lt;br /&gt;
 	sort -t. -k1,1n -k2,2n -k3,3n -k4,4n	Sort IPV4 ip addresses&lt;br /&gt;
•	echo &amp;#039;Test&amp;#039; | tr &amp;#039;[:lower:]&amp;#039; &amp;#039;[:upper:]&amp;#039;	Case conversion&lt;br /&gt;
•	tr -dc &amp;#039;[:print:]&amp;#039; &amp;lt; /dev/urandom	Filter non printable characters&lt;br /&gt;
•	tr -s &amp;#039;[:blank:]&amp;#039; &amp;#039;\t&amp;#039; &amp;lt;/proc/diskstats | cut -f4	cut fields separated by blanks&lt;br /&gt;
•	history | wc -l	Count lines&lt;br /&gt;
•	seq 10 | paste -s -d &amp;#039; &amp;#039;	Concatenate and separate line items to a single line&lt;br /&gt;
set operations (Note you can export LANG=C for speed. Also these assume no duplicate lines within a file)&lt;br /&gt;
 	sort -u file1 file2	Union of unsorted files&lt;br /&gt;
 	sort file1 file2 | uniq -d	Intersection of unsorted files&lt;br /&gt;
 	sort file1 file1 file2 | uniq -u	Difference of unsorted files&lt;br /&gt;
 	sort file1 file2 | uniq -u	Symmetric Difference of unsorted files&lt;br /&gt;
 	join -t&amp;#039;\0&amp;#039; -a1 -a2 file1 file2	Union of sorted files&lt;br /&gt;
 	join -t&amp;#039;\0&amp;#039; file1 file2	Intersection of sorted files&lt;br /&gt;
 	join -t&amp;#039;\0&amp;#039; -v2 file1 file2	Difference of sorted files&lt;br /&gt;
 	join -t&amp;#039;\0&amp;#039; -v1 -v2 file1 file2	Symmetric Difference of sorted files&lt;br /&gt;
math&lt;br /&gt;
•	echo &amp;#039;(1 + sqrt(5))/2&amp;#039; | bc -l	Quick math (Calculate φ). See also bc&lt;br /&gt;
•	seq -f &amp;#039;4/%g&amp;#039; 1 2 99999 | paste -sd-+ | bc -l	Calculate π the unix way&lt;br /&gt;
•	echo &amp;#039;pad=20; min=64; (100*10^6)/((pad+min)*8)&amp;#039; | bc	More complex (int) e.g. This shows max FastE packet rate&lt;br /&gt;
•	echo &amp;#039;pad=20; min=64; print (100E6)/((pad+min)*8)&amp;#039; | python	Python handles scientific notation&lt;br /&gt;
•	echo &amp;#039;pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)&amp;#039; | gnuplot -persist	Plot FastE packet rate vs packet size&lt;br /&gt;
•	echo &amp;#039;obase=16; ibase=10; 64206&amp;#039; | bc	Base conversion (decimal to hexadecimal)&lt;br /&gt;
•	echo $((0x2dec))	Base conversion (hex to dec) ((shell arithmetic expansion))&lt;br /&gt;
•	units -t &amp;#039;100m/9.58s&amp;#039; &amp;#039;miles/hour&amp;#039;	Unit conversion (metric to imperial)&lt;br /&gt;
•	units -t &amp;#039;500GB&amp;#039; &amp;#039;GiB&amp;#039;	Unit conversion (SI to IEC prefixes). See also numfmt&lt;br /&gt;
•	units -t &amp;#039;1 googol&amp;#039;	Definition lookup&lt;br /&gt;
•	seq 100 | paste -s -d+ | bc	Add a column of numbers. See also add and funcpy&lt;br /&gt;
calendar&lt;br /&gt;
•	cal -3	Display a calendar&lt;br /&gt;
•	cal 9 1752	Display a calendar for a particular month year&lt;br /&gt;
•	date -d fri	What date is it this friday. See also day&lt;br /&gt;
•	[ $(date -d &amp;#039;12:00 today +1 day&amp;#039; +%d) = &amp;#039;01&amp;#039; ] || exit	exit a script unless it&amp;#039;s the last day of the month&lt;br /&gt;
•	date --date=&amp;#039;25 Dec&amp;#039; +%A	What day does xmas fall on, this year&lt;br /&gt;
•	date --date=&amp;#039;@2147483647&amp;#039;	Convert seconds since the epoch (1970-01-01 UTC) to date&lt;br /&gt;
•	TZ=&amp;#039;America/Los_Angeles&amp;#039; date	What time is it on west coast of US (use tzselect to find TZ)&lt;br /&gt;
•	date --date=&amp;#039;TZ=&amp;quot;America/Los_Angeles&amp;quot; 09:00 next Fri&amp;#039;	What&amp;#039;s the local time for 9AM next Friday on west coast US&lt;br /&gt;
locales&lt;br /&gt;
•	printf &amp;quot;%&amp;#039;d\n&amp;quot; 1234	Print number with thousands grouping appropriate to locale&lt;br /&gt;
•	BLOCK_SIZE=\&amp;#039;1 ls -l	Use locale thousands grouping in ls. See also l&lt;br /&gt;
•	echo &amp;quot;I live in `locale territory`&amp;quot;	Extract info from locale database&lt;br /&gt;
•	LANG=en_IE.utf8 locale int_prefix	Lookup locale info for specific country. See also ccodes&lt;br /&gt;
•	locale -kc $(locale | sed -n &amp;#039;s/\(LC_.\{4,\}\)=.*/\1/p&amp;#039;) | less	List fields available in locale database&lt;br /&gt;
recode (Obsoletes iconv, dos2unix, unix2dos)&lt;br /&gt;
•	recode -l | less	Show available conversions (aliases on each line)&lt;br /&gt;
 	recode windows-1252.. file_to_change.txt	Windows &amp;quot;ansi&amp;quot; to local charset (auto does CRLF conversion)&lt;br /&gt;
 	recode utf-8/CRLF.. file_to_change.txt	Windows utf8 to local charset&lt;br /&gt;
 	recode iso-8859-15..utf8 file_to_change.txt	Latin9 (western europe) to utf8&lt;br /&gt;
 	recode ../b64 &amp;lt; file.txt &amp;gt; file.b64	Base64 encode&lt;br /&gt;
 	recode /qp.. &amp;lt; file.qp &amp;gt; file.txt	Quoted printable decode&lt;br /&gt;
 	recode ..HTML &amp;lt; file.txt &amp;gt; file.html	Text to HTML&lt;br /&gt;
•	recode -lf windows-1252 | grep euro	Lookup table of characters&lt;br /&gt;
•	echo -n 0x80 | recode latin-9/x1..dump	Show what a code represents in latin-9 charmap&lt;br /&gt;
•	echo -n 0x20AC | recode ucs-2/x2..latin-9/x	Show latin-9 encoding&lt;br /&gt;
•	echo -n 0x20AC | recode ucs-2/x2..utf-8/x	Show utf-8 encoding&lt;br /&gt;
CDs&lt;br /&gt;
 	gzip &amp;lt; /dev/cdrom &amp;gt; cdrom.iso.gz	Save copy of data cdrom&lt;br /&gt;
 	mkisofs -V LABEL -r dir | gzip &amp;gt; cdrom.iso.gz	Create cdrom image from contents of dir&lt;br /&gt;
 	mount -o loop cdrom.iso /mnt/dir	Mount the cdrom image at /mnt/dir (read only)&lt;br /&gt;
 	wodim dev=/dev/cdrom blank=fast	Clear a CDRW&lt;br /&gt;
 	gzip -dc cdrom.iso.gz | wodim -tao dev=/dev/cdrom -v -data -	Burn cdrom image (use --prcap to confirm dev)&lt;br /&gt;
 	cdparanoia -B	Rip audio tracks from CD to wav files in current dir&lt;br /&gt;
 	wodim -v dev=/dev/cdrom -audio -pad *.wav	Make audio CD from all wavs in current dir (see also cdrdao)&lt;br /&gt;
 	oggenc --tracknum=$track track.cdda.wav -o track.ogg	Make ogg file from wav file&lt;br /&gt;
disk space (See also FSlint)&lt;br /&gt;
•	ls -lSr	Show files by size, biggest last&lt;br /&gt;
•	du -s * | sort -k1,1rn | head	Show top disk users in current dir. See also dutop&lt;br /&gt;
•	du -hs /home/* | sort -k1,1h	Sort paths by easy to interpret disk usage&lt;br /&gt;
•	df -h	Show free space on mounted filesystems&lt;br /&gt;
•	df -i	Show free inodes on mounted filesystems&lt;br /&gt;
•	fdisk -l	Show disks partitions sizes and types (run as root)&lt;br /&gt;
•	rpm -q -a --qf &amp;#039;%10{SIZE}\t%{NAME}\n&amp;#039; | sort -k1,1n	List all packages by installed size (Bytes) on rpm distros&lt;br /&gt;
•	dpkg-query -W -f=&amp;#039;${Installed-Size;10}\t${Package}\n&amp;#039; | sort -k1,1n	List all packages by installed size (KBytes) on deb distros&lt;br /&gt;
•	dd bs=1 seek=2TB if=/dev/null of=ext3.test	Create a large test file (taking no space). See also truncate&lt;br /&gt;
•	&amp;gt; file	truncate data of file or create an empty file&lt;br /&gt;
monitoring/debugging&lt;br /&gt;
•	tail -f /var/log/messages	Monitor messages in a log file&lt;br /&gt;
•	strace -c ls &amp;gt;/dev/null	Summarise/profile system calls made by command&lt;br /&gt;
•	strace -f -e open ls &amp;gt;/dev/null	List system calls made by command&lt;br /&gt;
•	strace -f -e trace=write -e write=1,2 ls &amp;gt;/dev/null	Monitor what&amp;#039;s written to stdout and stderr&lt;br /&gt;
•	ltrace -f -e getenv ls &amp;gt;/dev/null	List library calls made by command&lt;br /&gt;
•	lsof -p $$	List paths that process id has open&lt;br /&gt;
•	lsof ~	List processes that have specified path open&lt;br /&gt;
•	tcpdump not port 22	Show network traffic except ssh. See also tcpdump_not_me&lt;br /&gt;
•	ps -e -o pid,args --forest	List processes in a hierarchy&lt;br /&gt;
•	ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed &amp;#039;/^ 0.0 /d&amp;#039;	List processes by % cpu usage&lt;br /&gt;
•	ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS	List processes by mem (KB) usage. See also ps_mem.py&lt;br /&gt;
•	ps -C firefox-bin -L -o pid,tid,pcpu,state	List all threads for a particular process&lt;br /&gt;
•	ps -p 1,$$ -o etime=	List elapsed wall time for particular process IDs&lt;br /&gt;
•	watch -n.1 pstree -Uacp $$	Display a changing process subtree&lt;br /&gt;
•	last reboot	Show system reboot history&lt;br /&gt;
•	free -m	Show amount of (remaining) RAM (-m displays in MB)&lt;br /&gt;
•	watch -n.1 &amp;#039;cat /proc/interrupts&amp;#039;	Watch changeable data continuously&lt;br /&gt;
•	udevadm monitor	Monitor udev events to help configure rules&lt;br /&gt;
system information (see also sysinfo) (&amp;#039;#&amp;#039; means root access is required)&lt;br /&gt;
•	uname -a	Show kernel version and system architecture&lt;br /&gt;
•	head -n1 /etc/issue	Show name and version of distribution&lt;br /&gt;
•	cat /proc/partitions	Show all partitions registered on the system&lt;br /&gt;
•	grep MemTotal /proc/meminfo	Show RAM total seen by the system&lt;br /&gt;
•	grep &amp;quot;model name&amp;quot; /proc/cpuinfo	Show CPU(s) info&lt;br /&gt;
•	lspci -tv	Show PCI info&lt;br /&gt;
•	lsusb -tv	Show USB info&lt;br /&gt;
•	mount | column -t	List mounted filesystems on the system (and align output)&lt;br /&gt;
•	grep -F capacity: /proc/acpi/battery/BAT0/info	Show state of cells in laptop battery&lt;br /&gt;
#	dmidecode -q | less	Display SMBIOS/DMI information&lt;br /&gt;
#	smartctl -A /dev/sda | grep Power_On_Hours	How long has this disk (system) been powered on in total&lt;br /&gt;
#	hdparm -i /dev/sda	Show info about disk sda&lt;br /&gt;
#	hdparm -tT /dev/sda	Do a read speed test on disk sda&lt;br /&gt;
#	badblocks -s /dev/sda	Test for unreadable blocks on disk sda&lt;br /&gt;
interactive (see also linux keyboard shortcuts)&lt;br /&gt;
•	readline	Line editor used by bash, python, bc, gnuplot, ...&lt;br /&gt;
•	screen	Virtual terminals with detach capability, ...&lt;br /&gt;
•	mc	Powerful file manager that can browse rpm, tar, ftp, ssh, ...&lt;br /&gt;
•	gnuplot	Interactive/scriptable graphing&lt;br /&gt;
•	links	Web browser&lt;br /&gt;
•	xdg-open .	open a file or url with the registered desktop application&lt;/div&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
</feed>