"Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid." – Albert Einstein

Linux cmd Page 3

21. ar

ar key [args] [posname] [count] archive [files]

Maintain a group of files that are combined into a file archive. Used most commonly to create and update static library files, as used by the link editor (ld). Compiler frontends often call ar automatically. Only one key letter may be used, but each can be combined with additional args (with no separations between). posname is the name of a file in archive. When moving or replacing files, you can specify that they be placed before or after posname. ar has largely been superseded by tar and bzip2.



Delete files from archive.


Move files to end of archive.


Print files in archive.


Append files to archive.


Replace files in archive.


List the contents of archive or list the named files.


Extract contents from archive or only the named files.



Use with r or m key to place files in the archive after posname.


Same as a, but before posname.


Create archive silently.


Truncate long filenames.


Same as b.


For backward compatibility; meaningless in Linux.


Use count parameter. Where multiple entries with the same name are found, use the count instance.


Preserve original timestamps.


Use full pathname. Useful for non-POSIX-compliant archives.


Force regeneration of archive symbol table (useful after running strip).


Do not regenerate symbol table.


Use with r to replace only files that have changed since being put in archive.


Verbose; print a description of actions taken.


Print version number.


Replace mylib.a with object files from the current directory:

ar r mylib.a `ls *.o`

22. arch


Print machine architecture type to standard output. Equivalent to uname -m.


23. arecord

arecord [options] [filename]

Records sound using ALSA. Accepts the same arguments and options as aplay.


24. arecordmidi

arecord [options] [filename]

Records midi files using ALSA. You must specify the port using the -p flag.



Set the sequencer host and port used. The default host is the local host, and the default is port 0.


Display help message.


Display version number.

-l, –list

List available ports.


Set the tempo value to n beats per minute. The default is 120.


Set timing (SMPTE resolution) to n frames per second. The value is normally 24, 25, 29.97 (NTSC dropframe), or 30.


Set the frequency with which timestamps, or ticks, are used in the file. For MIDI files using musical tempo, timestamps are set in ticks per beat (default 384), while those with SMPTE timing use ticks per frame (default 40).


For each channel of input, create a separate track in the MIDI output file.


25. arp

arp [options]

TCP/IP command. Clear, add to, or dump the kernel’s Address Resolution Protocol (ARP) cache (/proc/net/arp). ARP is used to translate protocol addresses to hardware interface addresses. Modifying your ARP cache can change which interfaces handle specific requests. ARP cache entries may be marked with the following flags: C (complete), M (permanent), and P (publish). While arp can create a proxy for a single system, subnet proxies are now handled by the arp kernel module, arp(7). See the “Linux 2.4 or later Advanced Routing HOWTO” for details.


host option arguments may be given as either a hostname or an IP address. With the -D option, they may also be given as a hardware interface address (e.g., eth0, eth1).

-a [hosts] , –display [hosts]

Display entries for hosts or, if none are specified, all entries.

-d host [pub] , –delete host [pub]

Remove the specified host‘s entry. To delete a proxy entry, add the pub argument and specify the interface associated with the proxy using -i.

-D, –use-device

Use the hardware address associated with the specified interface. This may be used with -s when creating a proxy entry.

-f file, –file file

Read entries from file and add them.

-H type, –hw-type type, -t type

Search for type entries when examining the ARP cache. type is usually ether (Ethernet), which is the default, but may be ax25 (AX.25 packet radio), arcnet (ARCnet), pronet (PROnet), or netrom (NET/ROM).

-i interface, –device interface

Select an interface. If you are dumping the ARP cache, this option will cause the command to display only the entries using that interface. When setting entries, this will cause the interface to be associated with that entry. If you do not use this option when setting an entry, the kernel will guess.

-n, –numeric

Display host IP addresses instead of their domain names.

-s host hardware-address [netmask mask] [pub] , –set host hardware-address [pub]

Add a permanent entry for host at hardware-address. A hardware-address for type ether hardware is 6 hexadecimal bytes, colon-separated. The pub argument can be used to set the publish flag, creating a proxy entry.

-v, –verbose

Verbose mode.


Display entry for host eris:

arp -a eris

Set a permanent cache entry for host illuminati, whose hardware address you know:

arp -s illuminati 00:05:23:73:e6:cf

Set an ARP proxy for host fnord using the eth0 interface’s hardware address:

arp -Ds fnord eth0 pub

Remove the fnord ARP proxy:

arp -i eth0 -d fnord pub

26. as

as [options] files

Generate an object file from each specified assembly-language source file. Object files have the same root name as source files but replace the .s suffix with .o. There may be some additional system-specific options.


[ | files]

Read input files from standard input, or from files if the pipe is used.

-a[cdhlmns] [=file]

With only the -a option, list source code, assembler listing, and symbol table. The other options specify additional things to list or omit:


Omit false conditionals.


Omit debugging directives.


Include the high-level source code, if available.


Include an assembly listing.


Include macro expansions.


Suppress forms processing.


Include a symbol listing.


Set the listing filename to file.

–defsym symbol=value

Define the symbol to have the value value, which must be an integer.


Skip whitespace and comment preprocessing.


Treat warnings as errors.


Generate debugging information in stabs format.


Generate DWARF2 debugging information.

-o objfile

Place output in object file objfile (default is file.o).


Print information on how much time and space assembler uses.


Display the version number of the assembler.

-I path

Include path when searching for .include directives.


Don’t warn about signed overflow.


Combine both data and text in text section.


Don’t show warnings.


Generate object file even if there are errors.

27. at

at [options] time [date]

Execute commands at a specified time and optional date. The commands are read from standard input or from a file. (See also batch.) End input with EOF. time can be formed either as a numeric hour (with optional minutes and modifiers) or as a keyword. It can contain an optional date, formed as a month and date, a day of the week, or a special keyword (today or tomorrow). An increment can also be specified.

The at command can always be issued by a privileged user. Other users must be listed in the file /etc/at.allow if it exists; otherwise, they must not be listed in /etc/at.deny. If neither file exists, only a privileged user can issue the command.


-c job [job…]

Display the specified jobs on the standard output. This option does not take a time specification.

-d job [job…]

Delete the specified jobs. Same as atrm.

-f file

Read job from file, not from standard input.


Report all jobs that are scheduled for the invoking user. Same as atq.


Mail user when job has completed, regardless of whether output was created.

-q letter

Place job in queue denoted by letter, where letter is any single letter from a-z or A-Z. Default queue is a. (The batch queue defaults to b.) Higher-lettered queues run at a lower priority.


Display the version number.


hh:[mm] [modifiers]

Hours can have one digit or two (a 24-hour clock is assumed by default); optional minutes can be given as one or two digits; the colon can be omitted if the format is h, hh, or hhmm (e.g., valid times are 5, 5:30, 0530, 19:45). If modifier am or pm is added, time is based on a 12-hour clock. If the keyword zulu is added, times correspond to Greenwich Mean Time.

midnight | noon | teatime | now

Use any one of these keywords in place of a numeric time. teatime translates to 4:00 p.m.; now must be followed by an increment (described in a moment).


month num[, year]

month is one of the 12 months, spelled out or abbreviated to its first three letters; num is the calendar date of the month; year is the four-digit year. If the given month occurs before the current month, at schedules that month next year.


One of the seven days of the week, spelled out or abbreviated to its first three letters.

today | tomorrow

Indicate the current day or the next day. If date is omitted, at schedules today when the specified time occurs later than the current time; otherwise, at schedules tomorrow.


Supply a numeric increment if you want to specify an execution time or day relative to the current time. The number should precede any of the keywords minute, hour, day, week, month, or year (or their plural forms). The keyword next can be used as a synonym of + 1:


In typical usage, you run at and input commands that you want executed at a particular time, followed by EOF.

$ at 1:00 am tomorrow
at> ./total_up > output

at> mail joe < output
at> <EOT> Entered by pressing Ctrl-D
job 1 at 2003-03-19 01:00

The two commands could also be placed in a file and submitted as follows:

&dollar; at 1:00 am tomorrow < scriptfile

More examples of syntax follow. Note that the first two commands here are equivalent:

&dollar; at 1945 December 9
&dollar; at 7:45pm Dec 9
&dollar; at 3 am Saturday

&dollar; at now + 5 hours
&dollar; at noon next day

28. atd

atd options

System administration command. Normally started in a system startup file. Execute jobs queued by the at command.


-b n

Wait at least n seconds after beginning one job before beginning the next job. Default is 60.


Print error messages to standard error instead of using syslog.

-l average

When system load average is higher than average, wait to begin a new job. Default is 0.8.


Process queue once, then exit.

29. atq

atq [options]

List the user’s pending jobs, unless the user is a privileged user; in that case, list everybody’s jobs. Same as at -l, and related to batch and atrm.


-q queue

Query only the specified queue and ignore all other queues.


Show jobs that have completed but have not yet been deleted.


Print the version number.

30. atrm

atrm [options] job [job...]

Delete jobs that have been queued for future execution. Same as at -d.


-q queue

Remove job from the specified queue.


Print the version number and then exit.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s