Difference between revisions of "Miscellaneous commands"

From Christoph's Personal Wiki
Jump to: navigation, search
Line 20: Line 20:
  
 
For an example, say you want to resize all of the jpeg images in your current directory to 800x600 and place them in a sub-directory called, "<tt>resized</tt>". Then you would execute the following commands:
 
For an example, say you want to resize all of the jpeg images in your current directory to 800x600 and place them in a sub-directory called, "<tt>resized</tt>". Then you would execute the following commands:
 
+
find . -maxdepth 1 -name '*.jpg' -type f -exec convert -resize 800x600 {} resized/{} \;
<pre>find . -maxdepth 1 -name '*.jpg' -type f -exec convert -resize 800x600 {} resized/{} \;</pre>
+
  
 
It is also possible to have the above commands run recursively through a directory and its sub-directories like so:
 
It is also possible to have the above commands run recursively through a directory and its sub-directories like so:
 +
find . -follow -name '*.jpg' -type f -exec convert -resize 800x600 {} ../resized/{} \;
  
<pre>find . -follow -name '*.jpg' -type f -exec convert -resize 800x600 {} ../resized/{} \;</pre>
+
Note that the programme <tt>convert</tt> is part of the [[ImageMagick]] suite and you will need to have it installed to use the above commands (it is, by default, in SuSE Linux and most distributions).
 
+
Note that the programme <tt>convert</tt> is part of the [[ImageMagick]] suite and you will need to have it installed to use the above commands (it is, by default, in SuSE Linux).
+
  
 
==ps2png==
 
==ps2png==
Line 37: Line 35:
 
Sometimes it is necessary to find files over a certain size and it can be somewhat tedious <tt>ls</tt>-ing through your many directories. The following command will list only those files over a certain size and only within the specified directory (and sub-directories):
 
Sometimes it is necessary to find files over a certain size and it can be somewhat tedious <tt>ls</tt>-ing through your many directories. The following command will list only those files over a certain size and only within the specified directory (and sub-directories):
  
<pre>find some_directory/ -size +2000k -ls</pre>
+
find some_directory/ -size +2000k -ls
 
+
 
which will only list files over 2000 kb (2 MB).
 
which will only list files over 2000 kb (2 MB).
  
 
==Finding files containing a string in a directory hierarchy==
 
==Finding files containing a string in a directory hierarchy==
In this example, all <tt>.php</tt> files will be searched for the string "<tt>MySQL</tt>" (case-insensitive with <tt>-i</tt>) and the line numbers will also be returned (using <tt>-n</tt>):
+
In this example, all <tt>.php</tt> files will be [[find|searched]] for the string "<tt>MySQL</tt>" (case-insensitive with <tt>-i</tt>) and the line numbers will also be returned (using <tt>-n</tt>):
 
+
find . -name '*.php' -type f | xargs grep -n -i 'MySQL'
<pre>find . -name '*.php' -type f | xargs grep -n -i 'MySQL'</pre>
+
  
 
==nrg2iso==
 
==nrg2iso==
Line 64: Line 60:
  
 
==Printing a block of text from a file==
 
==Printing a block of text from a file==
Say you have a file, <tt>foo</tt>, and it contains the following lines (note the captial letters and the full stop in line six):
+
Say you have a file, <tt>foo</tt>, and it contains the following lines (note the capital letters and the full stop in line six):
 
+
 
<pre>
 
<pre>
 
one blah blah
 
one blah blah
Line 75: Line 70:
 
</pre>
 
</pre>
  
If you only want to print out lines 3, 4, and 5, execute the following command:
+
*If you only want to print out lines 3, 4, and 5, execute the following command:
<pre>awk "/three/,/five/" < foo</pre>
+
awk "/three/,/five/" < foo
 +
*If you only want to print out lines starting with a capital "F", execute the following command:
 +
awk "/^F/" < foo
 +
*If you only want to print out lines ''ending'' in a full stop, execute the following command:
 +
awk "/\.$/" < foo
 +
*Finally, if you only want to print out lines containing the numbers "5" ''and'' "6", execute the following command:
 +
awk "/[5-6]/" < foo
  
If you only want to print out lines starting with a capital "F", execute the following command:
+
''Note: See [[awk]] for details.''
<pre>awk "/^F/" < foo</pre>
+
  
If you only want to print out lines ''ending'' in a full stop, execute the following command:
+
==Linux I/O redirection==
<pre>awk "/\.$/" < foo</pre>
+
 
+
Finally, if you only want to print out lines containing the numbers "5" ''and'' "6", execute the following command:
+
<pre>awk "/[5-6]/" < foo</pre>
+
 
+
==Linux I/O dedirection==
+
 
* The following command saves <tt>stdout</tt> and <tt>stderr</tt> to the files "<tt>out.txt</tt>" and "<tt>err.txt</tt>", respectively:
 
* The following command saves <tt>stdout</tt> and <tt>stderr</tt> to the files "<tt>out.txt</tt>" and "<tt>err.txt</tt>", respectively:
 
  ./cmd 1>out.txt 2>err.txt
 
  ./cmd 1>out.txt 2>err.txt
Line 101: Line 95:
  
 
Also note that Linux uses the following redirection codes/handles (see: [[Redirection (Linux)|redirection]]):
 
Also note that Linux uses the following redirection codes/handles (see: [[Redirection (Linux)|redirection]]):
* 0 = <tt>stdin</tt>
+
*0 = <tt>stdin</tt>
* 1 = <tt>stdout</tt>
+
*1 = <tt>stdout</tt>
* 2 = <tt>stderr</tt>
+
*2 = <tt>stderr</tt>
  
 
==Count number of n-word lengths==
 
==Count number of n-word lengths==
Line 115: Line 109:
 
  seq 1 32 | paste - tmp_n-word_lenghts.dat >n-word_lengths.dat
 
  seq 1 32 | paste - tmp_n-word_lenghts.dat >n-word_lengths.dat
  
==Edit a file from the CLI using Perl==
+
==Edit a file from the CLI using [[Perl]]==
  
 
  perl -p -i.bak -e 's|before|after|' filename  # backup of original file 'filename.bak'
 
  perl -p -i.bak -e 's|before|after|' filename  # backup of original file 'filename.bak'
Line 143: Line 137:
 
   -rw-r--r--  1 foo users 2.0M Feb 18 11:19 mylargefile_ac
 
   -rw-r--r--  1 foo users 2.0M Feb 18 11:19 mylargefile_ac
 
   ...
 
   ...
 
==Save man pages as plain text==
 
% man grep | col -b > grep.txt
 
  
 
==Stego trick using built-in Linux utilities==
 
==Stego trick using built-in Linux utilities==
Line 151: Line 142:
 
  xv bar.gif    # views just fine
 
  xv bar.gif    # views just fine
 
  unzip bar.gif  # extracts 'foo.zip'
 
  unzip bar.gif  # extracts 'foo.zip'
 
==Misc==
 
Display the total number of files in the current working directory and all of its subdirectories:
 
find . -type f -print | wc  -l
 
Display a list of directories and how much space they consume, sorted from the largest to the smallest:
 
du | sort -nr
 
Format text for printing:
 
cat poorly_formatted_report.txt | fmt | pr | lpr
 
cat unsorted_list_with_dupes.txt | sort | uniq | pr | lpr
 
Delete files older than ''n'' days:
 
find /path/to/files* -mtime +5 -exec rm {} \;
 
  
 
==cat and squeeze-blank==
 
==cat and squeeze-blank==
Line 167: Line 147:
 
  cat -s foo | tr -d '\f'
 
  cat -s foo | tr -d '\f'
 
The second command, [[tr]], just says delete ("<code>-d</code>") any form feeds (you would use this if you want to print the file).
 
The second command, [[tr]], just says delete ("<code>-d</code>") any form feeds (you would use this if you want to print the file).
 
==Download multiple files in bash using for-loop==
 
#!/bin/bash
 
for (( a=1; a<=96; a++ ))
 
do
 
    wget -c http://www.manga.com/images/qtvim/Vol_01/$a.jpg
 
done
 
  
 
==Create a favicon==
 
==Create a favicon==
Line 188: Line 161:
  
 
==Misc==
 
==Misc==
 +
*Save man pages as plain text:
 +
man grep | col -b > grep.txt
 +
*Display the total number of files in the current working directory and all of its subdirectories:
 +
find . -type f -print | wc  -l
 +
*Display a list of directories and how much space they consume, sorted from the largest to the smallest:
 +
du | sort -nr
 +
*Format text for printing:
 +
cat poorly_formatted_report.txt | fmt | pr | lpr
 +
cat unsorted_list_with_dupes.txt | sort | uniq | pr | lpr
 +
*Delete files older than ''n'' days:
 +
find /path/to/files* -mtime +5 -exec rm {} \;
 +
*Download multiple files in bash using for-loop:
 +
for (( a=1; a<=96; a++ )) ;do wget -c http://www.manga.com/images/qtvim/Vol_01/$a.jpg; done
 
*Multiple unzip: The following command will <tt>unzip</tt> all zip files in the current directory:
 
*Multiple unzip: The following command will <tt>unzip</tt> all zip files in the current directory:
 
  for i in $(ls *.zip); do unzip $i; done
 
  for i in $(ls *.zip); do unzip $i; done
Line 204: Line 190:
  
 
==See also==
 
==See also==
* [[AWK programming language|awk]]
+
*[[awk]]/gawk
* [[Findutils|find]]
+
*[[Findutils|find]]
* [[Convert (command)|convert]]
+
*[[Findutils|xargs]]
* [[ImageMagick]]
+
*[[ImageMagick]]
* [[Findutils|xargs]]
+
*[[Convert (command)|convert]]
* [[Bash]]
+
*[[Bash]]
* [[Tee (command)|tee]]
+
*[[Tee (command)|tee]]
  
 
==To Do==
 
==To Do==
*[http://ark.sourceforge.net/index.html The Arusha Project (ARK)]
+
===Lifehacker===
*[http://en.wikipedia.org/wiki/Category:GNU_project_software GNU project software]
+
*[http://en.wikipedia.org/wiki/GNU_Scientific_Library GNU Scientific Library]
+
*[http://en.wikipedia.org/wiki/DotGNU DotGNU]
+
*[http://clpbar.sourceforge.net/ Command Line Progress Bar (bar)]
+
*[http://phpgroupware.org/ phpGroupWare]
+
*[http://en.wikipedia.org/wiki/Patch_%28Unix%29 patch]
+
*[http://www.eps.mcgill.ca/jargon/jargon.html The New Hacker's Dictionary]
+
 
*[http://lifehacker.com/software/gmail/geek-to-live--back-up-gmail-with-fetchmail-235207.php Geek to Live: Back up Gmail with fetchmail]
 
*[http://lifehacker.com/software/gmail/geek-to-live--back-up-gmail-with-fetchmail-235207.php Geek to Live: Back up Gmail with fetchmail]
 
*[http://www.lifehacker.com/software/top/geek-to-live--keep-your-calendar-in-plain-text-with-remind-186661.php Geek to Live: Keep your calendar in plain text with Remind]
 
*[http://www.lifehacker.com/software/top/geek-to-live--keep-your-calendar-in-plain-text-with-remind-186661.php Geek to Live: Keep your calendar in plain text with Remind]
 
*[http://lifehacker.com/software/command-line/getting-things-done-with-rulebased-list-processing-217063.php Getting things done with rule-based list processing]
 
*[http://lifehacker.com/software/command-line/getting-things-done-with-rulebased-list-processing-217063.php Getting things done with rule-based list processing]
 +
*[http://lifehacker.com/software/bookmarks/hack-attack-firefox-and-the-art-of-keyword-bookmarking-196779.php Hack Attack: Firefox and the art of keyword bookmarking]
 +
===Howtoforge===
 +
*[http://www.eps.mcgill.ca/jargon/jargon.html The New Hacker's Dictionary]
 
*[http://www.howtoforge.com/video_streaming_lighttpd_flowplayer Build Your Own Video Community With Lighttpd And FlowPlayer (Debian Etch)]
 
*[http://www.howtoforge.com/video_streaming_lighttpd_flowplayer Build Your Own Video Community With Lighttpd And FlowPlayer (Debian Etch)]
*[http://www.physik.uni-wuerzburg.de/%7Evrbehr/cups-pdf/ CUPS-PDF]
 
 
*[http://www.howtoforge.com/point_in_time_restoration_mysql_zrm How to perform a point in time restoration using ZRM for MySQL]
 
*[http://www.howtoforge.com/point_in_time_restoration_mysql_zrm How to perform a point in time restoration using ZRM for MySQL]
 
*[http://www.howtoforge.com/ipp_based_print_server_cups Step-by-Step IPP based Print Server using CUPS]
 
*[http://www.howtoforge.com/ipp_based_print_server_cups Step-by-Step IPP based Print Server using CUPS]
Line 231: Line 212:
 
*[http://www.howtoforge.com/sysstat_monitoring_centos How To Monitor A System With Sysstat On Centos 4.3]
 
*[http://www.howtoforge.com/sysstat_monitoring_centos How To Monitor A System With Sysstat On Centos 4.3]
 
*[http://www.howtoforge.com/sysstat_monitoring_centos Accessing Windows Or Samba Shares Using AutoFS]
 
*[http://www.howtoforge.com/sysstat_monitoring_centos Accessing Windows Or Samba Shares Using AutoFS]
 +
===Sourceforge===
 +
*[http://ark.sourceforge.net/index.html The Arusha Project (ARK)]
 +
*[http://clpbar.sourceforge.net/ Command Line Progress Bar (bar)]
 +
*[http://sourceforge.net/projects/smbnetfs SMBNetFS] &mdash; a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows.
 +
===Wikipedia===
 +
*[[wikipedia:Category:GNU project software]]
 +
*[[wikipedia:GNU Scientific Library]]
 +
*[[wikipedia:DotGNU]]
 +
*[[wikipedia:Patch_%28Unix%29]] (patch)
 +
*[[wikipedia:Filesystem in Userspace]] (aka "FUSE")
 +
===Other===
 +
*[http://phpgroupware.org/ phpGroupWare]
 
*[http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS) HOWTO Auto mount filesystems (AUTOFS)]
 
*[http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS) HOWTO Auto mount filesystems (AUTOFS)]
 
*[http://linux.inet.hr/sshfs_secure_and_transparent_access_to_remote_filesystems.html sshfs - secure and transparent access to remote filesystems]
 
*[http://linux.inet.hr/sshfs_secure_and_transparent_access_to_remote_filesystems.html sshfs - secure and transparent access to remote filesystems]
*[http://lifehacker.com/software/bookmarks/hack-attack-firefox-and-the-art-of-keyword-bookmarking-196779.php Hack Attack: Firefox and the art of keyword bookmarking]
 
 
*[http://applications.linux.com/article.pl?sid=07/03/05/1949213&from=rss Become a digital video editing guru using Linux tools]
 
*[http://applications.linux.com/article.pl?sid=07/03/05/1949213&from=rss Become a digital video editing guru using Linux tools]
 
*[http://www.cyberciti.biz/ nixCraft]
 
*[http://www.cyberciti.biz/ nixCraft]
Line 241: Line 233:
 
*[http://www.igglo.co.uk/6/15-javascript-snippets-you-cant-live-without/ 15 Javascript Snippets You Can't Live Without]
 
*[http://www.igglo.co.uk/6/15-javascript-snippets-you-cant-live-without/ 15 Javascript Snippets You Can't Live Without]
 
*[http://www.kexi-project.org/ Kexi Project] &mdash; "Microsoft Access for Linux"
 
*[http://www.kexi-project.org/ Kexi Project] &mdash; "Microsoft Access for Linux"
*[[wikipedia:Filesystem in Userspace]] (aka "FUSE")
 
*[http://sourceforge.net/projects/smbnetfs SMBNetFS] &mdash; a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows.
 
 
*[http://www.tuxmachines.org/node/14738 The Lazy Guide to Installing Knoppix on a USB Key]
 
*[http://www.tuxmachines.org/node/14738 The Lazy Guide to Installing Knoppix on a USB Key]
 
*[http://www.gnome.org/projects/tracker/ Tracker]
 
*[http://www.gnome.org/projects/tracker/ Tracker]

Revision as of 06:43, 24 September 2007

This article will present various miscellaneous commands tested in Linux (running SuSE 10.2 and Mandriva). Most of these will be simple command line tools. Eventually, many of these will have their own article. For now, they are presented as is with absolutely no guarantee and zero responsibility on my part if they cause loss of information or files. Use at your own risk.

Google tricks

  • Finding files:
-inurl:(htm|html|php) intitle:"index of" +"last modified" 
+"parent directory" +description +size +(jpg|png) "Lion"
  • Finding documents:
-inurl:(htm|html|php) intitle:"index of" +"last modified"
+"parent directory" +description +size +(pdf|doc) "shakespeare"
  • Phonebook:
rphonebook: John Doe Portland OR
bphonebook: Blue Sushi Seattle WA

Note: See Google Search Manual and Google command line help for more tricks.

Bulk image resize

If you are like me and have a high resolution digital camera, it is often necessary to resize the images before emailing them to friends and family. It is, of course, possible to manually resize them using Adobe Photoshop, The Gimp, or any other image editing programme. However, it is possible to automate this task using simple command line tools.

For an example, say you want to resize all of the jpeg images in your current directory to 800x600 and place them in a sub-directory called, "resized". Then you would execute the following commands:

find . -maxdepth 1 -name '*.jpg' -type f -exec convert -resize 800x600 {} resized/{} \;

It is also possible to have the above commands run recursively through a directory and its sub-directories like so:

find . -follow -name '*.jpg' -type f -exec convert -resize 800x600 {} ../resized/{} \;

Note that the programme convert is part of the ImageMagick suite and you will need to have it installed to use the above commands (it is, by default, in SuSE Linux and most distributions).

ps2png

gs -sDEVICE=ppmraw -sOutputFile=- -sNOPAUSE -q foo.ps -c showpage -c quit |\
pnmcrop| pnmmargin -white 10 | pnmtopng >foo.png

Tracking down large files

Sometimes it is necessary to find files over a certain size and it can be somewhat tedious ls-ing through your many directories. The following command will list only those files over a certain size and only within the specified directory (and sub-directories):

find some_directory/ -size +2000k -ls

which will only list files over 2000 kb (2 MB).

Finding files containing a string in a directory hierarchy

In this example, all .php files will be searched for the string "MySQL" (case-insensitive with -i) and the line numbers will also be returned (using -n):

find . -name '*.php' -type f | xargs grep -n -i 'MySQL'

nrg2iso

There is a command line utility, nrg2iso, for converting to ISO files in Linux. Linux users can easily convert the NRG file using the dd command in the following way:

dd bs=1k if=myfile.nrg of=image.iso skip=300

Or, you can just mount it like so:

mount -o loop, offset=307200 /path/to/image.nrg /path/to/mount

Selecting random lines from a file

This example could be used for printing random quotes from a file (note: the following should be issued as a single command):

FILE="/some/file_name"; 
nlines=$(wc -l < "$FILE"); 
IFS=$'\n'; 
array=($(<"$FILE")); 
echo "${array[$((RANDOM%nlines))]}"

Here, nlines holds the total number of lines in the file. The file is read into an array (note the use of IFS — this splits the lines based on '\n'). Then, once the array has been populated, print a random line from it.

Printing a block of text from a file

Say you have a file, foo, and it contains the following lines (note the capital letters and the full stop in line six):

one blah blah
Two blah blah
three blah blah 3, 4
Four blah blah
five blah blah 5, 6
six blah blah.
  • If you only want to print out lines 3, 4, and 5, execute the following command:
awk "/three/,/five/" < foo
  • If you only want to print out lines starting with a capital "F", execute the following command:
awk "/^F/" < foo
  • If you only want to print out lines ending in a full stop, execute the following command:
awk "/\.$/" < foo
  • Finally, if you only want to print out lines containing the numbers "5" and "6", execute the following command:
awk "/[5-6]/" < foo

Note: See awk for details.

Linux I/O redirection

  • The following command saves stdout and stderr to the files "out.txt" and "err.txt", respectively:
./cmd 1>out.txt 2>err.txt
  • The following command appends stdout and stderr to the files "out.txt" and "err.txt", respectively:
./cmd 1>>out.txt 2>>err.txt
  • The following command functions similar to the above two commands, but also copies stdout and stderr to the files "stdout.txt" and "stderr.txt", respectively:
(((./cmd | tee stdout.txt) 3>&1 1>&2 2>&3\
| tee stderr.txt) 3>&1 1>&2 2>&3) 1>out.txt 2>err.txt

Note: The above should be entered as one command (ie, the line that ends with a backslash is only continued on the next line because of the formatting constraints of this page).

Also note that Linux uses the following redirection codes/handles (see: redirection):

  • 0 = stdin
  • 1 = stdout
  • 2 = stderr

Count number of n-word lengths

for i in `seq 1 32` {
     egrep '^.{'$i'}$' /usr/share/dict/words | wc -l
}
# OR (depending on your shell),
for i in `seq 1 32`; do egrep '^.{'$i'}$' /usr/share/dict/words | wc -l; done

Then paste the numbers together (or, just add them to the above for-loop):

seq 1 32 | paste - tmp_n-word_lenghts.dat >n-word_lengths.dat

Edit a file from the CLI using Perl

perl -p -i.bak -e 's|before|after|' filename  # backup of original file 'filename.bak'
perl -p -i -e 's|before|after|ig' filename
-p 
Execute the command for every line of the file.
-i 
Invokes in place editing. If a backup extension is provided, a backup of the original file will be made with the extension provided. e.g. -i.bak.
-e 
Invoke command.

Command-line calculator

% echo "111111111 * 111111111" | bc
  12345678987654321
% echo -e "sqrt(25)\nquit\n" | bc -q -i
  5

Also,

% let x=3*4-6; echo $x

Split large files into small pieces

% ls -lh mylargefile
  -rw-r--r--  1 foo users 800M Feb 18 11:17 mylargefile
% split -b 2m largefile mylargefile_
% ls -lh mylargefile_* | head 3
  -rw-r--r--  1 foo users 2.0M Feb 18 11:19 mylargefile_aa
  -rw-r--r--  1 foo users 2.0M Feb 18 11:19 mylargefile_ab
  -rw-r--r--  1 foo users 2.0M Feb 18 11:19 mylargefile_ac
  ...

Stego trick using built-in Linux utilities

cat foo.zip >> bar.gif  # "hides" 'foo.zip' inside 'bar.gif'
xv bar.gif     # views just fine
unzip bar.gif  # extracts 'foo.zip'

cat and squeeze-blank

The cat utility has a nice little feature that allows you to "squeeze" multiple blank lines into a single line. In other words, never print more than one single blank line.

cat -s foo | tr -d '\f'

The second command, tr, just says delete ("-d") any form feeds (you would use this if you want to print the file).

Create a favicon

  • Step 1: Download png2ico and install (just type make)
  • Step 2: Create a PNG using something like GIMP (make sure the image is square and small; e.g. 128x128, 300x300, etc).
  • Step 3: Convert the image to a 32x32 PNG (or 16x16, if you wish)
convert foo.png -resize 32x32 favicon.png
  • Step 3: Convert to icon
png2ico favicon.ico favicon.png
# ~ OR ~
png2ico favicon.ico logo16x16.png logo32x32.png
see: Creative Favicons: When Small Is Beautiful for ideas

Misc

  • Save man pages as plain text:
man grep | col -b > grep.txt
  • Display the total number of files in the current working directory and all of its subdirectories:
find . -type f -print | wc  -l
  • Display a list of directories and how much space they consume, sorted from the largest to the smallest:
du | sort -nr
  • Format text for printing:
cat poorly_formatted_report.txt | fmt | pr | lpr
cat unsorted_list_with_dupes.txt | sort | uniq | pr | lpr
  • Delete files older than n days:
find /path/to/files* -mtime +5 -exec rm {} \;
  • Download multiple files in bash using for-loop:
for (( a=1; a<=96; a++ )) ;do wget -c http://www.manga.com/images/qtvim/Vol_01/$a.jpg; done
  • Multiple unzip: The following command will unzip all zip files in the current directory:
for i in $(ls *.zip); do unzip $i; done
  • Copying files through tar filter:
(cd /path/dir/from && tar -cvf - .) | (cd /path/dir/to && tar -xvf -)
  • Look up the definition of a word from the CLI:
curl dict://dict.org/d:word
  • Timed read-input using bash:
answer="yes";read -p "Do you wish to install now? " -t 10 answer;echo " Timed out; asumming $answer";
  • Check current battery charge system temperature:
acpi -t
  • Display information about all system users:
finger -l
  • Display distribution and version:
cat /etc/issue

See also

To Do

Lifehacker

Howtoforge

Sourceforge

Wikipedia

Other

External links