Linux cmd Page 3
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.
Replace mylib.a with object files from the current directory:
ar r mylib.a `ls *.o`
Print machine architecture type to standard output. Equivalent to uname -m.
Records sound using ALSA. Accepts the same arguments and options as aplay.
Records midi files using ALSA. You must specify the port using the -p flag.
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]
-d host [pub] , –delete host [pub]
-f file, –file file
-H type, –hw-type type, -t type
-i interface, –device interface
-s host hardware-address [netmask mask] [pub] , –set host hardware-address [pub]
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
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]
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…]
-d job [job…]
midnight | noon | teatime | now
month num[, year]
today | 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> mail joe < output
The two commands could also be placed in a file and submitted as follows:
$ at 1:00 am tomorrow < scriptfile
More examples of syntax follow. Note that the first two commands here are equivalent:
$ at 1945 December 9
$ at now + 5 hours
System administration command. Normally started in a system startup file. Execute jobs queued by the at command.
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.
Delete jobs that have been queued for future execution. Same as at -d.