Tuesday, January 4, 2011

linux Specific command wise Decsription

1.alias
Create an alias, aliases allow a string to be substituted for a word when it is used as the first word of a simple command.
Syntax:
alias [-p] [name[=value] ...]

unalias [-a] [name ... ]
Examples
alias ls='ls -F'

Now issuing the command 'ls' will actually run 'ls -F'
alias la='ls -lAXh --color=always|less -R'

apropos Search Help manual pages (man -k)
2.apt-get: Search for and install software packages (Debian)
Syntax:
3.1 Updating the list of available packages
The packaging system uses a private database to keep track of which packages are installed, which are not installed and which are available for installation. The apt-get program uses this database to find out how to install packages requested by the user and to find out which additional packages are needed in order for a selected package to work properly.
To update this list, you would use the command apt-get update. This command looks for the package lists in the archives found in /etc/apt/sources.list; see The /etc/apt/sources.list file, Section 2.1 for more information about this file.
It's a good idea to run this command regularly to keep yourself and your system informed about possible package updates, particularly security updates.
________________________________________
3.2 Installing packages
Finally, the process you've all been waiting for! With your sources.list ready and your list of available packages up to date, all you have to do is run apt-get to get your desired package installed. For example, you can run:
# apt-get install xchat
3.3 Removing packages
If you no longer want to use a package, you can remove it from your system using APT. To do this just type: apt-get remove package. For example:
# apt-get remove gnome-panel

3.4 Upgrading packages
Package upgrades are a great success of the APT system. They can be achieved with a single command: apt-get upgrade. You can use this command to upgrade packages within the same distribution, as well as to upgrade to a new distribution, although for the latter the command apt-get dist-upgrade is preferred; see section Upgrading to a new release, Section 3.5 for more details.
It's useful to run this command with the -u option. This option causes APT to show the complete list of packages which will be upgraded. Without it, you'll be upgrading blindly. APT will download the latest versions of each package and will install them in the proper order. It's important to always run apt-get update before you try this. See section Updating the list of available packages, Section 3.1. Look at this example:
# apt-get -u upgrade

3.5 Upgrading to a new release
This feature of APT allows you to upgrade an entire Debian system at once, either through the Internet or from a new CD (purchased or downloaded as an ISO image).
It is also used when changes are made to the relationships between installed packages. With apt-get upgrade, these packages would be kept untouched (kept back).
For example, suppose that you're using revision 0 of the stable version of Debian and you buy a CD with revision 3. You can use APT to upgrade your system from this new CD. To do this, use apt-cdrom (see section Adding a CD-ROM to the sources.list file, Section 2.4) to add the CD to your /etc/apt/sources.list and run apt-get dist-upgrade.
It's important to note that APT always looks for the most recent versions of packages. Therefore, if your /etc/apt/sources.list were to list an archive that had a more recent version of a package than the version on the CD, APT would download the package from there.
In the example shown in section Upgrading packages, Section 3.4, we saw that some packages were kept back. We'll solve this problem now with the dist-upgrade method:
# apt-get -u dist-upgrade

3.6 Removing unused package files: apt-get clean and autoclean
When you install a package APT retrieves the needed files from the hosts listed in /etc/apt/sources.list, stores them in a local repository (/var/cache/apt/archives/), and then proceeds with installation, see Installing packages, Section 3.2.
In time the local repository can grow and occupy a lot of disk space. Fortunately, APT provides tools for managing its local repository: apt-get's clean and autoclean methods.
apt-get clean removes everything except lock files from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. Thus, if you need to reinstall a package APT should retrieve it again.
apt-get autoclean removes only package files that can no longer be downloaded.
The following example show how apt-get autoclean works:
# ls /var/cache/apt/archives/logrotate* /var/cache/apt/archives/gpm*
logrotate_3.5.9-7_i386.deb
logrotate_3.5.9-8_i386.deb
gpm_1.19.6-11_i386.deb
In /var/cache/apt/archives there are two files for the package logrotate and one for the package gpm.
# apt-show-versions -p logrotate
logrotate/stable uptodate 3.5.9-8
# apt-show-versions -p gpm
gpm/stable upgradeable from 1.19.6-11 to 1.19.6-12
apt-show-versions shows that logrotate_3.5.9-8_i386.deb provides the up to date version of logrotate, so logrotate_3.5.9-7_i386.deb is useless. Also gpm_1.19.6-11_i386.deb is useless because a more recent version of the package can be retrieved.
# apt-get autoclean
Reading Package Lists... Done
Building Dependency Tree... Done
Del gpm 1.19.6-11 [145kB]
Del logrotate 3.5.9-7 [26.5kB]
Finally, apt-get autoclean removes only the old files. See How to upgrade packages from specific versions of Debian, Section 3.9 for more information on apt-show-versions.
________________________________________
3.7 Using APT with dselect
dselect is a program that helps users select Debian packages for installation. It's considered somewhat complicated and rather boring, but with practice you can get the hang of its console-based ncurses interface.
One feature of dselect is that it knows how to make use of the capacity Debian packages have for "recommending" and "suggesting" other packages for installation. To use the program, run `dselect' as root. Choose 'apt' as your access method. This isn't truly necessary, but if you're not using a CD ROM and you want to download packages from the Internet, it's the best way to use dselect.
To gain a better understanding of dselect's usage, read the dselect documentation found on the Debian page http://www.debian.org/doc/ddp.
After making your selections with dselect, use:
# apt-get -u dselect-upgrade
as in the example below:
# apt-get -u dselect-upgrade

3.8 How to keep a mixed system
People are sometimes interested in using one of the Debian versions as its main system distribution and one or more packages from another branch.
To set up what is your main version of Debian you should edit the /etc/apt/apt.conf (it does not usually exist, create it if you don't have one) to contain the following line:
APT::Default-Release "version";
Where version is the version of Debian you want to use as the main distribution. The versions you can use are stable, testing and unstable. To install packages from another version, then, you must use APT in the following way:
# apt-get -t distribution install package
3.9 How to upgrade packages from specific versions of Debian
apt-show-versions provides a safe way for users of mixed distributions to upgrade their systems without getting more of the less-stable distribution than they had in mind. For instance, it is possible to upgrade just your unstable packages by running after having installed the apt-show-versions package:
# apt-get install `apt-show-versions -u -b | grep unstable | cut -d ' ' -f 1`
________________________________________
3.10 How to keep specific versions of packages installed (complex)
You may have occasion to modify something in a package and don't have time or don't want to port those changes to a new version of the program. Or, for instance, you may have just upgraded your Debian distribution to 3.0, but want to continue with the version of a certain package from Debian 2.2. You can "pin" the version you have installed so that it will not be upgraded.
Using this resource is simple. You just need to edit the file /etc/apt/preferences.
The format is simple:
Package:
Pin:
Pin-Priority:
Each entry must be separated from any other entries by a blank line. For example, to keep package sylpheed that I have modified to use "reply-to-list" at version 0.4.99, I add:
Package: sylpheed
Pin: version 0.4.99*
Note that I used an * (asterisk). This is a "wildcard"; it say that I want that this "pin" to be valid for all versions beginning with 0.4.99. This is because Debian versions its packages with a "Debian revision" and I don't want to avoid the installation of these revisions. So, for instance, versions 0.4.99-1 and 0.4.99-10 will be installed as soon as they are made available. Note that if you modified the package you won't want to do things this way.
The pin priority helps determine whether a package matching the "Packages:" and "Pin:" lines will be installed, with higher priorities making it more likely that a matching package will be installed. You can read apt_preferences(7) for a thorough discussion of priorities, but a few examples should give the basic idea. The following describes the effect of setting the priority field to different values in the sylpheed example above.

3.aspell Spell Checker
Syntax: GNU Aspell
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell. It can either be used as a library or as an independent spell checker. Its main feature is that it does a superior job of suggesting possible replacements for a misspelled word than just about any other spell checker out there for the English language. Unlike Ispell, Aspell can also easily check documents in UTF-8 without having to use a special dictionary. Aspell will also do its best to respect the current locale setting. Other advantages over Ispell include support for using multiple dictionaries at once and intelligently handling personal dictionaries when more than one Aspell process is open at once.
4.awk Find and Replace text, database sort/validate/index
Syntax:
Find and Replace text, database sort/validate/index
Syntax

awk 'Program' Input-File1 Input-File2 ...

awk -f PROGRAM-FILE Input-File1 Input-File2 ...

5. bash GNU Bourne-Again Shell
Syntax:
bc Arbitrary precision calculator language
Syntax:
An arbitrary precision calculator language
Syntax
bc options file...


6.bg Send to background
Syntax:
Send job to background
Syntax
bg [PID...]


7. break Exit from a loop
Syntax:
Exit from a for, while, until, or select loop
SYNTAX
break [n]

8. builtin Run a shell builtin
Syntax:
Run a shell builtin, passing it args, and return its exit status.
SYNTAX
builtin [shell-builtin [args]]

9. bzip2 Compress or decompress named file(s)

What is bzip2?
bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.
data in memory using the bzip2 algorithms.


10. cal Display a calendar
Syntax:
Display a calendar
Syntax
cal [-mjy] [[month] year]

11. case Conditionally perform a command
Syntax:
Conditionally perform a command, case will selectively execute the command-list corresponding to the first pattern that matches word.
Syntax
case word in [ [(] pattern [| pattern]...) command-list ;;]... esac
The `|' is used to separate multiple patterns, and the `)' operator terminates a pattern list. A list of patterns and an associated command-list is known as a clause. Each clause must be terminated with `;;'.



12.cat Display the contents of a file
Syntax:
Display the contents of a file (concatenate)
Syntax
cat [Options] [File]...


13. cd Change Directory
Syntax:
Change Directory - change the current working directory to a specific Folder.
Syntax
cd [Options] [Directory]


14.cfdisk Partition table manipulator for Linux
Syntax:
Curses based disk partition table manipulator for Linux
Syntax
cfdisk [ -agvz ] [ -c cylinders ] [ -h heads ]
[ -s sectors-per-track ] [ -P opt ] [ device ]


15. chgrp Change group ownership
Syntax:
Change group ownership

'chgrp' changes the group ownership of each given File to Group (which can be either a group name or a numeric group id) or to the group of an existing reference file.
Syntax
chgrp [Options]... {Group | --reference=File} File...


16.chmod Change access permissions
Syntax:
Change access permissions, change mode.
Syntax
chmod [Options]... Mode [,Mode]... file...

chmod [Options]... Numeric_Mode file...

chmod [Options]... --reference=RFile file...

17. chown Change file owner and group
Syntax:
Change owner, change the user and/or group ownership of each given File to a new Owner.
Chown can also change the ownership of a file to match the user/group of an existing reference file.
SYNTAX
chown [Options]... NewOwner File...

chown [Options]... :Group File...

chown [Options]... --reference=RFILE File...

18. chroot Run a command with a different root directory
Syntax:
Run a command with a different root directory
'chroot' runs a command with a specified root directory. On many systems, only the super-user can do this.
SYNTAX
chroot NEWROOT [COMMAND [ARGS]...]

chroot OPTION

19.chkconfig System services (runlevel)
Update and query runlevel information for system services.
Syntax
chkconfig --list [name]
chkconfig --add name
chkconfig --del name
chkconfig [--level levels] name
chkconfig [--level levels] name



20. cksum Print CRC checksum and byte counts
Print CRC checksum and byte counts

Computes a cyclic redundancy check (CRC) checksum for each given FILE, or standard input if none are given or for a FILE of `-'.
SYNTAX
cksum [Option]... [File]...

21.clear Clear terminal screen
Syntax:

22.cmp Compare two files
Syntax:
Compare two files, and if they differ, tells the first byte and line number where they differ.

You can use the `cmp' command to show the offsets and line numbers where two files differ. `cmp' can also show all the characters that differ between the two files, side by side.
SYNTAX
cmp options... FromFile [ToFile]

23.comm Compare two sorted files line by line
Syntax:
Common - compare two sorted files line by line and write to standard output:
the lines that are common, plus the lines that are unique.
Syntax
comm [options]... File1 File2


24.command Run a command - ignoring shell functions
Syntax:
Run command with arguments ignoring any shell function named command.
SYNTAX
command [-pVv] command [arguments ...]


25.continue Resume the next iteration of a loop
Syntax:
• Resume the next iteration of an enclosing for, while, until, or select loop.
SYNTAX
continue [n]

26.cp Copy one or more files to another location
Syntax:
Copy one or more files to another location

Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
Syntax
cp [options]... Source Dest
cp [options]... Source... Directory


27.cron Daemon to execute scheduled commands
Syntax:
daemon to execute scheduled commands
Syntax
cron

28.crontab Schedule a command to run at a later time
Syntax:
Schedule a command to run at a later time
SYNTAX
crontab [ -u user ] file
crontab [ -u user ] { -l | -r | -e }

29.csplit Split a file into context-determined pieces
Syntax:
Split a file into context-determined pieces.
SYNTAX
csplit [options]... INPUT PATTERN...


30.cut Divide a file into several parts
Syntax:
Divide a file into several parts (columns)
Writes to standard output selected parts of each line of each input file, or standard input if no files are given or for a file name of `-'.
Syntax
cut [OPTION]... [FILE]...
31. date Display or change the date & time
Syntax:
Display or change the date.
Syntax
date [option]... [+Format]

date [option] [MMDDhhmm[[CC]YY][.ss]]

32. dc Desk Calculator
Syntax:
An arbitrary precision calculator language
Syntax
bc options file...


33. dd Convert and copy a file, write disk headers, boot records
Syntax:
Convert and copy a file, write disk headers, boot records, create a boot floppy.
Syntax
dd [OPTION]...

34. ddrescue Data recovery tool
Syntax:
Data recovery tool, save data from a crashed partition.
Syntax
ddrescue [options] infile outfile [logfile]


35. declare Declare variables and give them attributes
Syntax:
Declare variables and give them attributes.
SYNTAX
declare [-afFrxi] [-p] [name[=value]]


36.df Display free disk space
Syntax:
Disk Free - display free disk space.
With no arguments, `df' reports the space used and available on all currently mounted filesystems (of all types). Otherwise, `df' reports on the filesystem containing each argument file.
SYNTAX
df [option]... [file]...


37.diff Display the differences between two files
Syntax:
Display the differences between two files, or each corresponding file in two directories.
Each set of differences is called a "diff" or "patch". For files that are identical, diff normally produces no output; for binary (non-text) files, diff normally reports only that they are different.
Syntax
diff [options] from-file to-file

38.diff3 Show differences among three files
Syntax:
Show differences among three files.
When two people have made independent changes to a common original, `diff3' can report the differences between the original and the two changed versions, and can produce a merged file that contains both persons' changes together with warnings about conflicts.
The files to compare are MINE, OLDER, and YOURS. At most one of these three file names may be `-', which tells `diff3' to read the standard input for that file.
SYNTAX
diff3 [options] mine older yours


39. dig DNS lookup
Syntax:
dig (domain information groper)
A flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than dig.
Syntax:
dig [@server] [-b address] [-c class] [-f filename] [-k filename]
[-p port#] [-t type] [-x addr] [-y name:key] [-4] [-6]
[name] [type] [class] [queryopt...]
dig [-h]

dig [global-queryopt...] [query...]

40. dir Briefly list directory contents
Syntax:
Briefly list directory contents
SYNTAX
`dir' (also installed as `d')

41. dircolors Colour setup for `ls'
Syntax:
Color setup for `ls', outputs a sequence of shell commands to set up the terminal for color output from `ls' (and `dir', etc.).
Syntax

eval `dircolors [options]... [file]`

42.dirname Convert a full pathname to just a path
Syntax:
Convert a full pathname to just a path
Syntax
dirname pathname

43. dirs Display list of remembered directories
Syntax:
Display the list of currently remembered directories.
Syntax
dirs [+N | -N] [-clpv]


44. dmesg Print kernel & driver messages
Syntax:
Print kernel (and driver) messages, control the kernel ring buffer.
Syntax
dmesg [ -c ] [ -n level ] [ -s bufsize ]

45.du Estimate file space usage
Syntax:
Disk Usage - report the amount of disk space used by the specified files and for each subdirectory.
Syntax
du [options]... [file]...


46. echo Display message on screen
Syntax:
Display message on screen, writes each given STRING to standard output, with a space between each and a newline after the last one.
Syntax
echo [options]... [string]...


47.egrep Search file(s) for lines that match an extended expression
Syntax:
Search file(s) for lines that match an extended expression (extended grep)
Syntax
egrep [ options ] 'PATTERN' files ...

egrep is the same as `grep -E'

all other options are the same as grep

The PATTERN is a regexp. In typical usage, the regexp is quoted to
prevent the shell from expanding any of the special characters as file
name wildcards. Normally, `egrep' prints the lines that matched. If
multiple file names are provided on the command line, each output line
is preceded by the name of the file and a colon.


48.eject Eject removable media
Syntax:
Eject removable media
Syntax
eject -h
eject [-vnrsfmqp] []
eject [-vn] -d
eject [-vn] -a on|off|1|0 []
eject [-vn] -c slot []
eject [-vn] -t []
eject [-vn] -T []
eject [-vn] -x []
eject [-vn] -X []
eject -V

49.enable Enable and disable builtin shell commands
Syntax:
Enable and disable builtin shell commands.
Syntax
enable [-n] [-p] [-f filename] [-ads] [name ...]

50.env Environment variables
Syntax:
Display, set, or remove environment variables, Run a command in a modified environment.
Syntax
env [OPTION]... [NAME=VALUE]... [COMMAND [ARGS]...]

51.ethtool Ethernet card settings
Syntax:

52.eval Evaluate several commands/arguments
Syntax:
Evaluate several commands/arguments
Syntax
eval [arguments]

exec Execute a command
53. exit Exit the shell
Syntax:
Exit from a program, shell or log out of a Unix network.
Syntax
exit

54.expect Automate arbitrary applications accessed over a terminal
Syntax:
55.expand Convert tabs to spaces
Syntax:

56.export Set an environment variable
Syntax:
Set an environment variable. Mark each name to be passed to child processes in the environment.
Syntax
export [-fn] [-p] [name[=value]]


57. expr Evaluate expressions
Syntax:
Evaluate expressions, evaluates an expression and writes the result on standard output.
Syntax
expr expression...

Description:
Each token of the expression must be a separate argument.


58. false Do nothing, unsuccessfully
Syntax:
Do nothing, returning a non-zero (false) exit status
Syntax
false

59.fdformat Low-level format a floppy disk
Syntax:
Low-level format a floppy disk
Syntax
fdformat [ -n ] device

60.fdisk Partition table manipulator for Linux
Syntax:
Partition table manipulator for Linux
Syntax
fdisk [-u] device

fdisk -l [-u] device ...

fdisk -s partition ...

fdisk -v

Options
-u When listing partition tables, give sizes in sec¬
tors instead of cylinders.

-l List the partition tables for /dev/hd[a-d],
/dev/sd[a-h], /dev/ed[a-d], and then exit.

-s partition
The size of the partition (in blocks) is printed on
the standard output.

-v Print version number of fdisk program and exit.

61. fg Send job to foreground
Syntax:
Send job to foreground
Syntax
fg [PID...]


fgrep Search file(s) for lines that match a fixed string
file Determine file type
find Search for files that meet a desired criteria
fmt Reformat paragraph text
fold Wrap text to fit a specified width.
for Expand words, and execute commands
62.format Format disks or tapes
Syntax:

63.free Display memory usage
Syntax:
64. fsck File system consistency check and repair
Syntax:
Filesystem consistency check and interactive repair. Journaling file systems avoid the need to run fsck.
Syntax
fsck [options] [filesystem] ...

65. ftp File Transfer Protocol
Syntax:

66. function Define Function Macros
Syntax:
Shell functions are a way to group commands for later execution using a single name for the group. They are executed just like a "regular" command. When the name of a shell function is used as a simple command name, the list of commands associated with that function name is executed. Shell functions are executed in the current shell context; no new process is created to interpret them.
Functions are declared using this syntax:
[ function ] name () { command-list; }

67. fuser Identify/kill the process that is accessing a file
Syntax:
Identify processes using files or sockets, optionally: Kill the process that is accessing the file.
Syntax
fuser [-a|-s|-c] [-4|-6] [-n space ] [-k [-i] [-signal ] ] [-muvf] name

fuser -l

fuser -V

68. gawk Find and Replace text within file(s)
Syntax:
awk or gawk (gnu awk)
Find and Replace text, database sort/validate/index
Syntax

awk 'Program' Input-File1 Input-File2 ...

awk -f PROGRAM-FILE Input-File1 Input-File2 ...


69. getopts Parse positional parameters
Syntax:
getopts is used by shell scripts to parse positional parameters.
Syntax
getopts optstring name [args]

70.grep Search file(s) for lines that match a given
Syntax:
Search file(s) for specific text.
SYNTAX
grep "Search String" [filename]

grep [-e pattern] [file...]

grep [-f file] [file...]

pattern
71.groups Print group names a user is in
Syntax:
Print group names a user is in.
Syntax
groups [username]...

72.gzip Compress or decompress named file(s)
Syntax:
Compress or decompress named file(s)
SYNTAX
gzip options ...


73. hash Remember the full pathname of a name argument
Syntax:
Remember the full pathnames of commands specified as name arguments, so they need not be searched for on subsequent invocations.
SYNTAX
hash [-r] [-p filename] [name]

74.head Output the first part of file(s)
Syntax:
Output the first part of files, prints the first part (10 lines by default) of each file.
SYNTAX
head [options]... [file]...

75. history Command History
Syntax:
Command Line history
SYNTAX
history
history [n]
history -c
history -d offset
history [-anrw] [filename]
history -ps arg

76.hostname Print or set system name
Syntax:
Print or set system name
SYNTAX
hostname [name]

77.id Print user and group id's
Syntax:
Print real and effective user id (uid) and group id (gid), prints identity information about the given user, or if no user is specified the current process.
SYNTAX
id [options]... [username]
78. if Conditionally perform a command
Syntax:
Conditionally perform a command.
SYNTAX
if test-commands; then
consequent-commands;
[elif more-test-commands; then
more-consequents;]
[else alternate-consequents;]
fi

79. ifconfig Configure a network interface
Syntax:
Interface configurator - display your ip address, network interfaces, transferred and received data information, configure a network interface.
Syntax
ifconfig [interface]

ifconfig interface [aftype] options | address ...


80. ifdown Stop a network interface
Syntax:
Bring a network interface up or down
Syntax
ifup [options] -a | IFACE...

ifdown [options] -a|IFACE...


81. ifup Start a network interface up
Syntax:
Bring a network interface up or down
Syntax
ifup [options] -a | IFACE...

ifdown [options] -a|IFACE...


82. import Capture an X server screen and save the image to
File
Syntax:
Capture some or all of an X server screen and save the image to file.
SYNTAX
import [ options ... ] [ file ]

83. install Copy files and set attributes
Syntax:
Copy files and set attributes, copies files while setting their permission modes and, if possible, their owner and group.
SYNTAX
install [options]... SOURCE DEST

install [options]... SOURCE... DIRECTORY

install -d [options]... DIRECTORY...

84. join Join lines on a common field
Syntax:
Join lines on a common field, writes to standard output a line for each pair of input lines that have identical join fields.
SYNTAX
join [Options]... File1 File2

85. kill Stop a process from running
Syntax:
Stop a process from running, either via a signal or forced termination.
Syntax
kill [-s sigspec] [-n signum] [-sigspec] jobspec or pid
kill -l [exit_status]

killall Kill processes by name
l
86. less Display output one screen at a time
Syntax:
Display output one screen at a time, Search through output, Edit the command line.
SYNTAX
less [options]

| less [options]


87. let Perform arithmetic on shell variables
Syntax:
Perform arithmetic on shell variables.
SYNTAX
let expression [expression]

88.ln Make links between files
Syntax:
Make links between files, by default, it makes hard links; with the `-s' option, it makes symbolic (or "soft") links.
Syntax
ln [Options]... target [Linkname]

ln [Options]... target... Directory


89. local Create variables
Syntax:
Create variables
SYNTAX
local [option] name[=value]

90. locate Find files
Syntax:
Find files.
Syntax
locate [options] pattern


91. logname Print current login name
Syntax:
Print current login name
SYNTAX
logname

92.logout Exit a login shell
Syntax:
Exit a login shell.
SYNTAX
logout [n]

93.look Display lines beginning with a given string
Syntax:
Display any lines in file which contain string as a prefix.
Syntax
look [-df] [-t termchar] string [file]


94.lpc Line printer control program
Syntax:
line printer control program
SYNTAX
lpc [command [argument ...]]

95. lpr Off line print
Syntax:
off line print - sends a print job to the default system queue.
SYNTAX
lpr [-Pprinter] [-#num] [-C class] [-J job] [-T title] [-U user] [-i [numcols]]
[-1234 font] [-wnum] [-cdfghlnmprstv] [name ...]


96. lprint Print a file
Syntax:

lprintd Abort a print job
lprintq List the print queue
99.lprm Remove jobs from the print queue
Syntax:
Remove jobs from the line printer spooling queue
Syntax
lprm [-Pprinter] [-] [job# ...] [user ...]


100. ls List information about file(s)
Syntax:
List information about files.
Syntax
ls [Options]... [File]...

101.lsof List open files
Syntax:
List open files.
Syntax
lsof [ -?abChlnNOPRstUvVX ] [ -A A ] [ -c c ] [ +c c ] [ +|-d d ]
[ +|-D D ] [ +|-f [cfgGn] ] [ -F [f] ] [ -g [s] ] [ -i[i] ]
[ -k k ] [ +|-L [l] ] [ +|-m m ] [ +|-M ] [ -o [o] ] [ -p s ]
[ +|-r [t] ] [ -S [t] ] [ -T [t] ] [ -u s ] [ +|-w ]
[ -x [fl] ] [ -z [z] ] [ -Z [Z] ] [ -- ] [filenames]

101.make Recompile a group of programs
Syntax:

102. man Help manual
Syntax:
Display helpful information about commands.
Syntax
man [-k] [command]

man intro

man bash

info [command]

help [-s] [command]


103. mkdir Create new folder(s)
Syntax:
Create new folder(s), if they do not already exist.
SYNTAX
mkdir [Options] folder...

mkdir "Name with spaces"

104. mkfifo Make FIFOs (named pipes)
Syntax:
Make FIFOs (named pipes) with the specified names.
Syntax
mkfifo [options] NAME...


105. mkisofs Create an hybrid ISO9660/JOLIET/HFS filesystem
Syntax:

106.mknod Make block or character special files
Syntax:
creates a FIFO, character special file, or block special file with the specified name.
Syntax
mknod [options]... NAME Type [Major Minor]


107.more Display output one screen at a time
Syntax:
Display output one screen at a time, less provides more emulation and extensive enhancements.
SYNTAX
more [-dlfpcsu] [-num] [+/ pattern] [+ linenum] [file ...]


108.mount Mount a file system
Syntax:
mount a file system
All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree.
SYNTAX
mount -a [-fFnrsvw] [-t vfstype]

mount [-fnrsvw] [-o options [,...]] device | dir

mount [-fnrsvw] [-t vfstype] [-o options] device dir

mount [-hV]

109.mtools Manipulate MS-DOS files
Syntax:
Mtools is a public domain collection of tools to allow Unix systems to manipulate MS-DOS files: read, write, and move around files on an MS-DOS filesystem

Mtools are typically used to manipulate FAT formatted floppy disks. Each program attempts to emulate the MS-DOS equivalent command, these are different from Windows NT/2000 commands.

Mtools is sufficient to give access to MS-DOS filesystems. For instance, commands such as `mdir a:' work on the `a:' floppy without any preliminary mounting or initialization (assuming the default `/etc/mtools.conf' works on your machine). With mtools, one can change floppies too without unmounting and mounting.
110.mv Move or rename files or directories
Syntax:
Move or rename files or directories.
SYNTAX
mv [options]... Source Dest

mv [options]... Source... Directory

111.mmv Mass Move and rename (files)
Syntax:
Mass Move and rename - Move, copy, append or link Multiple files using wildcard patterns.
Syntax
mmv [Source_Option] [-h] [-d|p] [-g|t] [-v|n] [--] [from to]
112. netstat Networking information
Syntax:

113.nice Set the priority of a command or job
Syntax:
Run a command with modified scheduling priority, print or modify the scheduling priority of a job.
SYNTAX
nice [Option]... [Command [Arg]...]


114.nl Number lines and write files
Syntax:
Number lines and write files, writes each FILE to standard output, with line numbers added to some or all of the lines.
If no input file (or `-' ) is given nl will read from standard input.
SYNTAX
nl [options]... [File]...


115.nohup Run a command immune to hang-ups
Syntax:
No Hang Up. Run a command immune to hangups, runs the given command with hangup signals ignored, so that the command can continue running in the background after you log out.
SYNTAX
nohup Command [Arg]...

116. nslookup Query Internet name servers interactively
Syntax:
Query Internet name servers
Syntax:
nslookup

nslookup host-to-find

nslookup server

interactive mode:

nslookup -server

nslookup [-options] [host-to-find ]


117.open Open a file in its default application
Syntax:
Open a file in its default application.
Syntax
open Files...
118. op Operator access
Syntax:
Operator access. A flexible means for system administrators to grant trusted users access to certain root operations without having to give them full superuser privileges.
Syntax
op mnemonic [arg]

119. passwd Modify a user password
Syntax:
Modify a user password.
SYNTAX
passwd [options...]

120.paste Merge lines of files
Syntax:
Merge lines of files, write to standard output lines consisting of sequentially corresponding lines of each given file, separated by a TAB character.
SYNTAX
paste [options]... [file]...

121.pathchk Check file name portability
Syntax:

122.ping Test a network connection
Syntax:
Test a network connection. When using ping for fault isolation, it should first be run on the local host, to verify that the local network interface is up and running. Then, hosts and gateways further and further away should be `pinged'.
Syntax
ping [options] destination_host


123.pkill Stop processes from running
Syntax:
pgrep searches through the currently running processes, pkill will send the specified signal (by default SIGTERM) to each process instead of listing them on stdout.
Syntax
pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,...] [-g pgrp,...]
[-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...]
[-t term,...] [pattern]

pkill [-signal] [-fvx] [-n|-o] [-P ppid,...] [-g pgrp,...]
[-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...]
[-t term,...] [pattern]


124.popd Restore the previous value of the current directory
Synatax:
Remove the top entry from the directory stack, and cd to the new top directory.
SYNTAX
popd [+N | -N] [-n]


125.pr Prepare files for printing
Syntax:
Prepare files for printing, printing and pagination filter for text files.
When multiple input files are specified, each is read, formatted, and written to standard output.
SYNTAX
pr [options] [file ...]


printcap Printer capability database
printenv Print environment variables
128.printf Format and print data
Syntax:
Format and print data.
Write the formatted arguments to the standard output under the control of the format.
SYNTAX
printf format [argument]...

printf --help

printf --version


129.ps Process status
Syntax:
Process status, information about processes running in memory. If you want a repetitive update of this status, use top.
Syntax

ps option(s)
ps [-L]


130. pushd Save and then change the current directory
Syntax:
Save and then change the current directory. With no arguments, pushd exchanges the top two directories.
SYNTAX
pushd [dir | +N | -N] [-n]

131.pwd Print Working Directory
Syntax:
Print Working Directory (shell builtin)
Syntax
pwd [-LP]

132.quota Display disk usage and limits
Syntax:
Display disk usage and limits, by default only the user quotas are printed.
SYNTAX
quota [ -guv | q ]
quota [ -uv | q ] user
quota [ -gv | q ] group


133.quotacheck Scan a file system for disk usage
Syntax:
Scan a file system for disk usage
SYNTAX
quotacheck [-g] [-u] [-v] -a
quotacheck [-g] [-u] [-v] filesys ...

134.quotactl Set disk quotas
Syntax:
Set disk quotas
SYNTAX
#include

135.ram ram disk device
Syntax:
ram disk device
Ram is a block device to access the ram disk in raw mode.
It is typically created by:
mknod -m 660 /dev/ram b 1 1
chown root:disk /dev/ram
Files
/dev/ram

136.rcp Copy files between two machines
Syntax:
Remote Copy - move files between machines.
Each file or directory is either a remote filename of the form rname@rhost:path or a local filename.
Syntax
rcp [options] file1 file2

rcp [options] file ... directory

137.read read a line from standard input
Syntax:
Read a line from standard input
Syntax
read [-ers] [-a aname] [-p prompt] [-t timeout]
[-n nchars] [-d delim] [name...]

138.readonly Mark variables/functions as readonly
Syntax:
Mark variables/functions as readonly.
Syntax
readonly [-apf] [name] ...

139.reboot Reboot the system
140.renice Alter priority of running processes
141.remsync Synchronize remote files via email
142.return Exit a shell function
Syntax:
Cause a shell function to exit with the return value n.
Syntax
return [n]


143.rev Reverse lines of a file
Syntax:
Reverse lines of a file.
Syntax:

rev [file]

144.rm Remove files
Syntax:
Remove files (delete/unlink)
Syntax
rm [options]... file...

145.rmdir Remove folder(s)
Syntax:
Remove directory, this command will only work if the folders are empty.
Syntax
rmdir [options]... folder(s)...

146.rsync Remote file copy (Synchronize file trees)
Syntax:
Remote file copy - Synchronize file trees across local disks, directories or across a network.
Syntax

# Local file to Local file
rsync [option]... Source [Source]... Dest

# Local to Remote
rsync [option]... Source [Source]... [user@]host:Dest

rsync [option]... Source [Source]... [user@]host::Dest

# Remote to Local
rsync [option]... [user@]host::Source [Dest]

rsync [option]... [user@]host:SourceDest

rsync [option]... rsync://[user@]host[:PORT]/Source [Dest]

s
147.screen Multiplex terminal, run remote shells via ssh
Syntax:
Multiplex a physical terminal between several processes (typically interactive shells).
Syntax:

Start a screen session:

screen [ -options ] [ cmd [args] ]


148. scp Secure copy (remote file copy)
Syntax:
Secure copy (remote file copy program)
Syntax
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[ [user@]host1:]file1 [...] [ [user@]host2:]file2

149. sdiff Merge two files interactively
Syntax:
Merge two files interactively. (Show differences) with output to outfile.
SYNTAX
sdiff -o outfile [options] from-file to-file

150. sed Stream Editor
Syntax:
Merge two files interactively. (Show differences) with output to outfile.
SYNTAX
sdiff -o outfile [options] from-file to-file

151.select Accept keyboard input
Syntax:
The select construct allows the easy generation of menus. It has almost the same syntax as the for command.
Syntax
select name [in words ...]; do commands; done

152. seq Print numeric sequences
Syntax:
Print a sequence of numbers to standard output
Syntax
seq [options]... [FIRST [STEP]] LAST...


153. set Manipulate shell variables and functions
Syntax:
Manipulate shell variables and functions.
Syntax
set [--abBCefhHkmnpPtuvx] [-o option] [argument ...]

154.sftp Secure File Transfer Program
Syntax:

155.shift Shift positional parameters
Syntax:
Shift positional parameters to the left by n.
Syntax
shift [n]

156.shopt Shell Options
Syntax:
Shell Options
Syntax
shopt [-pqsu] [-o] [optname ...]


157. shutdown Shutdown or restart linux
Syntax:
Shutdown or restart linux
Syntax
shutdown [options] when [message]

158.sleep Delay for a specified time
Syntax: t
Delay for a specified time, pause for an amount of time specified by the sum of the values of the command line arguments
Syntax
sleep [NUMBER [smhd]]...

159.slocate Find files
Syntax:
Security Enhanced version of GNU Locate. Secure Locate provides a secure way to index and quickly search for files on your system. It uses incremental encoding just like GNU locate to compress its database to make searching faster, but it will also store file permissions and ownership so that users will not see files they do not have access to.
Syntax
slocate [-qi] [-d path] [--database=path] search string

slocate [-i] [-r regexp] [--regexp=regexp]

slocate [-qv] [-o file] [--output=file]

slocate [-e dir1,dir2,...] [-f fstype1,...] <[-l level] [-c] <[-U path] [-u]>

slocate [-Vh] [--version] [--help]


160. sort Sort text files
Syntax:
Sort text files.
Sort, merge, or compare all the lines from the files given (or standard input.)
Syntax
sort [options] [file...]
sort --help
sort --version


161.source Run commands from a file `.'
Syntax:
Run a command script in the current shell context.
Syntax
. filename [arguments]

source filename [arguments]

162.split Split a file into fixed-size pieces
Syntax:
Split a file into fixed-size pieces, creates output files containing consecutive sections of INPUT (standard input if none is given or INPUT is `-')
Syntax
split [options] [INPUT [PREFIX]]


163.ssh Secure Shell client (remote login program)
Syntax:

strace Trace system calls and signals
165.su Substitute user identity
Syntax:
Substitute user identity
Run a command with substitute user and group id, allow one user to temporarily become another user. It runs a command (often an interactive shell) with the real and effective user id, group id, and supplemental groups of a given user.
Syntax
su [options]... [user [arg]...]


166.sudo Execute a command as another user
Syntax:
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.
Syntax
sudo -K | -L | -V | -h | -k | -l | -v

sudo [-HPSb] [-a auth_type] [-c class|-] [-p prompt]
[-u username|#uid] {-e file [...] | -i | -s | command}

sudoedit [-S] [-a auth_type] [-p prompt] [-u username|#uid] file [...]

167. sum Print a checksum for a file
Syntax:
Print a checksum for a file.

`sum' is provided for compatibility; `cksum' is preferable in new applications.
Syntax
sum [options]... [file]...

168. symlink Make a new name for a file
Syntax:
make a new name for a file
Syntax
#include

int symlink(const char *OldPath, const char *NewPath);

169. sync Synchronize data on disk with memory
Syntax:
Synchronize data on disk with memory
Syntax
sync

170.tar Tape ARchiver
Syntax:
Output the last part of files, print the last part (10 lines by default) of each FILE;
tail reads from standard input if no files are given or when given a FILE of `-'.
Syntax
tail [options]... [file]...

tail -Number [options]... [file]...

tail +Number [options]... [file]...


171.tee Redirect output to multiple files
Syntax:
Redirect output to multiple files, copies standard input to standard output and also to any files given as arguments. This is useful when you want not only to send some data down a pipe, but also to save a copy.
Syntax
tee [options]... [file]...


172. test Evaluate a conditional expression
Syntax:
Evaluate a conditional expression expr.
Syntax
test expr
[ expr


173.time Measure Program running time
• Syntax:
Measure the running time of a program.
The `time' command will run another program, and record the elapsed time or CPU Resource Used time used by that program.
The information mmay be displayed on screen or saved in a file.
Syntax
time [option...] command [arg...]

174. times User and system times
Syntax:
Print out the user and system times used by the shell and its children.
Syntax
times

175. touch Change file timestamps
Syntax:
Change file timestamps, change the access and/or modification times of the specified files.
Syntax
touch [options]... File...


176.top List processes running on the system
Syntax:
Process viewer, find the CPU-intensive programs currently running. See ps for explanations of the field descriptors.
Syntax
top options

177.traceroute Trace Route to Host
Syntax:
Print the route packets take to network host.
Syntax
traceroute [options] host [packetsize]


178. trap Run a command when a signal is set(bourne)
Syntax:

179.tr Translate, squeeze, and/or delete characters
Translate, squeeze, and/or delete characters
Syntax
tr [options]... Set1 [Set2]

180.true Do nothing, successfully
Syntax:
Do nothing, returning a zero (true) exit status
`true' does nothing except return an exit status of 0, meaning
"success". It can be used as a place holder in shell scripts where a
successful command is needed, although the shell built-in command `:'
(colon) does the same thing faster.

`true' ignores _all_ command line arguments, even `--help' and
`--version', since to do otherwise would change expected behavior that
some programmers may be relying on.

181.tsort Topological sort
• Syntax:
Topological sort, perform a topological sort on the given FILE, or standard input if no input file is given or for a FILE of `-'.
Syntax
tsort [options] [file]


182.tty Print filename of terminal on stdin
Syntax:
Print file name of terminal on standard input, print the file name of the terminal connected to standard input. It prints `not a tty' if standard input is not a terminal.
SYNTAX
tty [option]...


183.type Describe a command
Syntax:
Describe a command, for each name, indicate how it would be interpreted if used as
a command name.
Syntax
type [-atp] [name ...]


184. ulimit Limit user resources
Syntax:
Control the resources available to a process started by the shell, on systems that allow such control.
Syntax
ulimit [-acdfHlmnpsStuv] [limit]


185.umask Users file creation mask
Syntax:
User's file creation mask. umask sets an environment variable which automatically sets file permissions on newly created files. i.e. it will set the shell process's file creation mask to mode.
Syntax
umask [-p] [-S] [mode]


186.umount Unmount a device
Syntax:

187.unalias Remove an alias
Syntax:
Create an alias, aliases allow a string to be substituted for a word when it is used as the first word of a simple command.
Syntax
alias [-p] [name[=value] ...]

unalias [-a] [name ... ]

188.uname Print system information
Syntax:
Print system information, print information about the machine and operating system it is run on. If no options are given, `uname' acts as if the `-s' option were given.
Syntax
uname [options]...


189. unexpand Convert spaces to tabs
Syntax:
Convert spaces to tabs, write the contents of each given FILE, or standard input if none are given or for a FILE of `-', to standard output. Strings of two or more space or tab characters are converted to as many tabs as possible followed by as many spaces as are needed.
Syntax
unexpand [options]... [file]...

190.uniq Uniquify files
Syntax:
Uniquify files, write out the unique lines from the given InputFile.
If an InputFile of `-' (or nothing) is given, then uniq will read from standard input.
Syntax
uniq [options]... [InputFile [OutputFile]]

191.units Convert units from one scale to another
Syntax:
Convert units from one scale to another. The units are defined in an external data file. You can use the extensive data file that comes with this program, or you can provide your own data file to suit your needs. You can use the program interactively with prompts, or you can use it from the command line.
Syntax
units options [FROM-UNIT [TO-UNIT]]


192.unset Remove variable or function names
Syntax:
Remove variable or function names
Syntax
unset [-fv] [name]

193.unshar Unpack shell archive scripts
Syntax:
Unpack shell archive scripts. Each file is processed in turn, as a shell archive or a collection of shell archives. If no files are given, then standard input is processed instead.
Syntax
unshar [options] ... [file... ]


194.until Execute commands (until error)
Syntax:
Execute consequent-commands as long as test-commands has an exit status which is not zero.
Syntax
until test-commands; do consequent-commands; done

195.useradd Create new user account
Syntax:
Create new user accounts or update default account information.
Unless invoked with the -D option, user must be given. useradd will create new entries in system files. Home directories and initial files may also be created as needed.
Syntax
useradd [options] [user]


196.usermod Modify user account
Syntax:
Modify user account information.
Syntax
usermod [options] [user]

197.users List users currently logged in
Syntax:
Print login names of users currently logged in, print on a single line a blank-separated list of user names of users currently logged in to the current host.
Syntax
users [file]

198.uuencode Encode a binary file
Syntax:
uuencode - encode a binary file

uudecode - decode a file created by uuencode
Syntax
uuencode [-m] [ file ] name

uudecode [-o outfile] [ file ]...

199.uudecode Decode a file created by uuencode
Syntax:
uuencode - encode a binary file

uudecode - decode a file created by uuencode
Syntax
uuencode [-m] [ file ] name

uudecode [-o outfile] [ file ]...

200. v Verbosely list directory contents (`ls -l -b')
Syntax:

vdir Verbosely list directory contents (`ls -l -b')
202.vi Text Editor
Syntax:
Vi has two modes insertion mode and command mode.
The editor begins in command mode, where cursor movement and copy/paste editing occur.
Most commands execute as soon as typed except for "colon" commands which execute when you press the return key.
Switch to Text or Insert mode:
Open line above cursor O
Insert text at beginning of line I Insert text at cursor i Insert text after cursor a Append text at line end A
Open line below cursor o
Switch to Command mode:
Switch to command mode
Cursor Movement (command mode):
Scroll Backward 1 screen b
Scroll Up 1/2 screen u
Go to beginning of line 0 Go to line n nG Go to end of line $
Scroll Down 1/2 screen d Go to line number ## :##
Scroll Forward 1 screen f
Go to last line G
Scroll by sentence f/b ( )
Scroll by word f/b w b Move left, down, up, right h j k l Left 6 chars 6h
Scroll by paragraph f/b { } Directional Movement Arrow Keys Go to line #6 6G
Deleting text (command mode):
Change word cw Replace one character r
Delete word dw Delete text at cursor x Delete entire line (to buffer) dd
Delete (backspace) text at cursor X Delete 5 lines (to buffer) 5dd
Delete current to end of line D Delete lines 5-10 :5,10d
Editing (command mode):
Copy line yy Copy n lines nyy Copy lines 1-2/paste after 3 :1,2t 3
Paste above current line P
Paste below current line p Move lines 4-5/paste after 6 :4,5m 6
Join previous line J
Search backward for string ?string Search forward for string /string Find next string occurrence n
% (entire file) s (search and replace) /old text with new/ c (confirm) g (global - all) :%s/oldstring/newstring/cg Ignore case during search :set ic
Repeat last command . Undo previous command u Undo all changes to line U
Save and Quit (command mode):
Save changes to buffer :w Save changes and quit vi :wq Save file to new file :w file
Quit without saving :q! Save lines to new file :10,15w file
"vi was written for a world that doesn't exist anymore - unless you decide to get a satellite phone and use it to connect to the Net at 2400 baud" - Bill Joy
203.vmstat Report virtual memory statistics
Syntax:
Report virtual memory statistics: processes, memory, paging, block IO, traps, and cpu activity.
Syntax
vmstat [-a] [-n] [delay [ count]]
vmstat [-f] [-s] [-m]
vmstat [-S unit]
vmstat [-d]
vmstat [-p disk partition]
vmstat [-V]


w
204.watch Execute/display a program periodically
Syntax:
Execute a program periodically, showing output full screen
Syntax
watch [options] command command_options

205.wc Print byte, word, and line counts
Syntax:
Print byte, word, and line counts, count the number of bytes, whitespace-separated words, and newlines in each given FILE, or standard input if none are given or for a FILE of `-'.
Syntax
wc [options]... [file]...

206.whereis Report all known instances of a command
Syntax:
Locate the binary, source, and manual page files for specified commands/files.
The supplied filenames are first stripped of leading pathname components and any (single) trailing extension of the form .ext (for example, .c). Prefixes of s. resulting from use of source code control are also dealt with. whereis then attempts to locate the desired program in a list of standard Linux directories (e.g., /bin, /etc, /usr/bin, /usr/local/bin/, etc.).
Syntax
whereis [options] files


207.which Locate a program file in the user's path.
Syntax:
Locate a program file in the user's path.
For each of its arguments which prints to stdout the full path of the executable(s). It does this by searching the directories listed in the environment variable PATH.
Syntax
which [options] [--] program_name [...]

208.while Execute commands
Syntax:
Execute consequent-commands as long as test-commands has an exit status of zero
Syntax
while test-commands; do consequent-commands; done

209.who Print all usernames currently logged in
Syntax:
Print who is currently logged in
Syntax
who [options] [file] [am i]

210.whoami Print the current user id and name (`id -un')
Syntax:
Print the current user id and name.
Syntax
whoami [options]

211.Wget Retrieve web pages or files via HTTP, HTTPS or FTP
Syntax:

212.write Send a message to another user
Syntax:
Send a message to another user
Syntax:

write user [ttyname]

213.xargs Execute utility, passing constructed argument list(s)
Syntax:
Execute a command, passing constructed argument list(s). The arguments are typically a long list of filenames (generated by ls or find) that are passed to xargs via a pipe.
Syntax
xargs [options] [command]

214.yes Print a string until interrupted
Syntax:
`yes' prints the command line arguments, separated by spaces and followed by a newline, forever until it is killed.
If no arguments are given, it prints `y' followed by
a newline forever until killed.

The only options are a lone `--help' or `--version'.

215.. Run a command script in the current shell
Syntax:

Run a command script in the current shell context.
Syntax
. filename [arguments]

216. ### Comment / Remark
Syntax:
A comment or remark is indicated by starting the line with the # character
# This is a description
# Another remark
command
# Another remark

No comments:

Post a Comment