Category Archives: Linux Man Pages - Page 3

DATE

DATE(1) User Commands DATE(1)

NAME
date – print or set the system date and time

SYNOPSIS
date [OPTION]… [+FORMAT]
date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]

DESCRIPTION
Display the current time in the given FORMAT, or set the system date.

-d, –date=STRING
display time described by STRING, not `now’

-f, –file=DATEFILE
like –date once for each line of DATEFILE

-r, –reference=FILE
display the last modification time of FILE

-R, –rfc-2822
output date and time in RFC 2822 format. Example: Mon, 07 Aug
2006 12:34:56 -0600

–rfc-3339=TIMESPEC
output date and time in RFC 3339 format. TIMESPEC=`date’, `sec-
onds’, or `ns’ for date and time to the indicated precision.
Date and time components are separated by a single space:
2006-08-07 12:34:56-06:00

-s, –set=STRING
set time described by STRING

-u, –utc, –universal
print or set Coordinated Universal Time

–help display this help and exit

–version
output version information and exit

FORMAT controls the output. The only valid option for the second form
specifies Coordinated Universal Time. Interpreted sequences are:

%% a literal %

%a locale’s abbreviated weekday name (e.g., Sun)

%A locale’s full weekday name (e.g., Sunday)

%b locale’s abbreviated month name (e.g., Jan)

%B locale’s full month name (e.g., January)

%c locale’s date and time (e.g., Thu Mar 3 23:05:25 2005)

%C century; like %Y, except omit last two digits (e.g., 21)

%d day of month (e.g, 01)

%D date; same as %m/%d/%y

%e day of month, space padded; same as %_d

%F full date; same as %Y-%m-%d

%g last two digits of year of ISO week number (see %G)

%G year of ISO week number (see %V); normally useful only with %V

%h same as %b

%H hour (00..23)

%I hour (01..12)

%j day of year (001..366)

%k hour ( 0..23)

%l hour ( 1..12)

%m month (01..12)

%M minute (00..59)

%n a newline

%N nanoseconds (000000000..999999999)

%p locale’s equivalent of either AM or PM; blank if not known

%P like %p, but lower case

%r locale’s 12-hour clock time (e.g., 11:11:04 PM)

%R 24-hour hour and minute; same as %H:%M

%s seconds since 1970-01-01 00:00:00 UTC

%S second (00..60)

%t a tab

%T time; same as %H:%M:%S

%u day of week (1..7); 1 is Monday

%U week number of year, with Sunday as first day of week (00..53)

%V ISO week number, with Monday as first day of week (01..53)

%w day of week (0..6); 0 is Sunday

%W week number of year, with Monday as first day of week (00..53)

%x locale’s date representation (e.g., 12/31/99)

%X locale’s time representation (e.g., 23:13:48)

%y last two digits of year (00..99)

%Y year

%z +hhmm numeric timezone (e.g., -0400)

%:z +hh:mm numeric timezone (e.g., -04:00)

%::z +hh:mm:ss numeric time zone (e.g., -04:00:00)

%:::z numeric time zone with : to necessary precision (e.g., -04,
+05:30)

%Z alphabetic time zone abbreviation (e.g., EDT)

By default, date pads numeric fields with zeroes. The following
optional flags may follow `%’:

– (hyphen) do not pad the field

_ (underscore) pad with spaces

0 (zero) pad with zeros

^ use upper case if possible

# use opposite case if possible

After any flags comes an optional field width, as a decimal number;
then an optional modifier, which is either E to use the locale’s alter-
nate representations if available, or O to use the locale’s alternate
numeric symbols if available.

DATE STRING
The –date=STRING is a mostly free format human readable date string
such as “Sun, 29 Feb 2004 16:21:42 -0800″ or “2004-02-29 16:21:42″ or
even “next Thursday”. A date string may contain items indicating cal-
endar date, time of day, time zone, day of week, relative time, rela-
tive date, and numbers. An empty string indicates the beginning of the
day. The date string format is more complex than is easily documented
here but is fully described in the info documentation.

AUTHOR
Written by David MacKenzie.

REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.

COPYRIGHT
Copyright © 2008 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for date is maintained as a Texinfo manual. If
the info and date programs are properly installed at your site, the
command

info coreutils ‘date invocation’

should give you access to the complete manual.

GNU coreutils 6.12 May 2008 DATE(1)

Technorati Tags: ,

DD

DD(1) User Commands DD(1)

NAME
dd – convert and copy a file

SYNOPSIS
dd [OPERAND]…
dd OPTION

DESCRIPTION
Copy a file, converting and formatting according to the operands.

bs=BYTES
force ibs=BYTES and obs=BYTES

cbs=BYTES
convert BYTES bytes at a time

conv=CONVS
convert the file as per the comma separated symbol list

count=BLOCKS
copy only BLOCKS input blocks

ibs=BYTES
read BYTES bytes at a time

if=FILE
read from FILE instead of stdin

iflag=FLAGS
read as per the comma separated symbol list

obs=BYTES
write BYTES bytes at a time

of=FILE
write to FILE instead of stdout

oflag=FLAGS
write as per the comma separated symbol list

seek=BLOCKS
skip BLOCKS obs-sized blocks at start of output

skip=BLOCKS
skip BLOCKS ibs-sized blocks at start of input

status=noxfer
suppress transfer statistics

BLOCKS and BYTES may be followed by the following multiplicative suf-
fixes: xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1000*1000, M
1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E,
Z, Y.

Each CONV symbol may be:

ascii from EBCDIC to ASCII

ebcdic from ASCII to EBCDIC

ibm from ASCII to alternate EBCDIC

block pad newline-terminated records with spaces to cbs-size

unblock
replace trailing spaces in cbs-size records with newline

lcase change upper case to lower case

nocreat
do not create the output file

excl fail if the output file already exists

notrunc
do not truncate the output file

ucase change lower case to upper case

swab swap every pair of input bytes

noerror
continue after read errors

sync pad every input block with NULs to ibs-size; when used with
block or unblock, pad with spaces rather than NULs

fdatasync
physically write output file data before finishing

fsync likewise, but also write metadata

Each FLAG symbol may be:

append append mode (makes sense only for output; conv=notrunc sug-
gested)

direct use direct I/O for data

directory fail unless a directory dsync use synchronized I/O
for data sync likewise, but also for metadata nonblock use
non-blocking I/O noatime do not update access time noctty
do not assign controlling terminal from file nofollow do not
follow symlinks

Sending a USR1 signal to a running `dd’ process makes it print I/O
statistics to standard error and then resume copying.

$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

18335302+0 records in 18335302+0 records out 9387674624 bytes
(9.4 GB) copied, 34.6279 seconds, 271 MB/s

Options are:

–help display this help and exit

–version
output version information and exit

AUTHOR
Written by Paul Rubin, David MacKenzie, and Stuart Kemp.

REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.

COPYRIGHT
Copyright © 2008 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for dd is maintained as a Texinfo manual. If
the info and dd programs are properly installed at your site, the com-
mand

info coreutils ‘dd invocation’

should give you access to the complete manual.

GNU coreutils 6.12 May 2008 DD(1)

Technorati Tags: ,

DEPMOD

DEPMOD(8) DEPMOD(8)

NAME
depmod – program to generate modules.dep and map files.

SYNOPSIS
depmod [ -b basedir ] [ -e ] [ -F System.map ] [ -n ] [ -v ] [ version
] [ -A ]

depmod [ -e ] [ -FSystem.map ] [ -n ] [ -v ] [ version ] [ filename ...
]

DESCRIPTION
Linux kernel modules can provide services (called “symbols”) for other
modules to use (using EXPORT_SYMBOL in the code). If a second module
uses this symbol, that second module clearly depends on the first mod-
ule. These dependencies can get quite complex.

depmod creates a list of module dependencies, by reading each module
under /lib/modules/version and determining what symbols it exports, and
what symbols it needs. By default this list is written to modules.dep
in the same directory. If filenames are given on the command line,
only those modules are examined (which is rarely useful, unless all
modules are listed).

If a version is provided, then that kernel version’s module directory
is used, rather than the current kernel version (as returned by “uname
-r”).

depmod will also generate various map files in this directory, for use
by the hotplug infrastructure.

OPTIONS
-a –all
Probe all modules. This option is enabled by default if no file
names are given in the command-line.

-A –quick
This option scans to see if any modules are newer than the mod-
ules.dep file before any work is done: if not, it silently exits
rather than regenerating the files.

-b basedir –basedir basedir
If your modules are not currently in the (normal) directory
/lib/modules/version, but in a staging area, you can specify a
basedir which is prepended to the directory name. This basedir
is stripped from the resulting modules.dep file, so it is ready
to be moved into the normal location.

-C –config file or directory
This option overrides the default configuration file (/etc/dep-
mod.conf or /etc/depmod.d/ if that is not found).

-e –errsyms
When combined with the -F option, this reports any symbols which
a module needs which are not supplied by other modules or the
kernel. Normally, any symbols not provided by modules are
assumed to be provided by the kernel (which should be true in a
perfect world).

-F –filesyms System.map
Supplied with the System.map produced when the kernel was built,
this allows the -e option to report unresolved symbols.

-h –help
Print the help message, and exit.

-n –dry-run
This sends the resulting modules.dep, then the various map
files, to standard output, rather than writing them into the
module directory.

-v –verbose
In verbose mode depmod will print (to stdout) all the symbols
each module depends on and the module’s file name which provides
that symbol.

-V –version
Show version of program, and exit. See below for caveats when
run on older kernels.

BACKWARDS COMPATIBILITY
This version of depmod is for kernels 2.5.48 and above. If it detects
a kernel with support for old-style modules, or the version specified
is before 2.5.48, it will attempt to run depmod.old in its place, so it
is completely transparent to the user.

COPYRIGHT
This manual page Copyright 2002, Rusty Russell, IBM Corporation.

SEE ALSO
modprobe(8), modules.dep(5), depmod.old(8)

22 August 2008 DEPMOD(8)

Technorati Tags: ,

DF

DF(1) User Commands DF(1)

NAME
df – report file system disk space usage

SYNOPSIS
df [OPTION]… [FILE]…

DESCRIPTION
This manual page documents the GNU version of df. df displays the
amount of disk space available on the file system containing each file
name argument. If no file name is given, the space available on all
currently mounted file systems is shown. Disk space is shown in 1K
blocks by default, unless the environment variable POSIXLY_CORRECT is
set, in which case 512-byte blocks are used.

If an argument is the absolute file name of a disk device node contain-
ing a mounted file system, df shows the space available on that file
system rather than on the file system containing the device node (which
is always the root file system). This version of df cannot show the
space available on unmounted file systems, because on most kinds of
systems doing so requires very nonportable intimate knowledge of file
system structures.

OPTIONS
Show information about the file system on which each FILE resides, or
all file systems by default.

Mandatory arguments to long options are mandatory for short options
too.

-a, –all
include dummy file systems

-B, –block-size=SIZE
use SIZE-byte blocks

-h, –human-readable
print sizes in human readable format (e.g., 1K 234M 2G)

-H, –si
likewise, but use powers of 1000 not 1024

-i, –inodes
list inode information instead of block usage

-k like –block-size=1K

-l, –local
limit listing to local file systems

–no-sync
do not invoke sync before getting usage info (default)

-P, –portability
use the POSIX output format

–sync invoke sync before getting usage info

-t, –type=TYPE
limit listing to file systems of type TYPE

-T, –print-type
print file system type

-x, –exclude-type=TYPE
limit listing to file systems not of type TYPE

-v (ignored)

–help display this help and exit

–version
output version information and exit

SIZE may be (or may be an integer optionally followed by) one of fol-
lowing: kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T,
P, E, Z, Y.

AUTHOR
Written by Torbj?rn Granlund, David MacKenzie, and Paul Eggert.

REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.

COPYRIGHT
Copyright © 2008 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for df is maintained as a Texinfo manual. If
the info and df programs are properly installed at your site, the com-
mand

info coreutils ‘df invocation’

should give you access to the complete manual.

GNU coreutils 6.12 May 2008 DF(1)

Technorati Tags: ,

DIFF

DIFF(1) User Commands DIFF(1)

NAME
diff – compare files line by line

SYNOPSIS
diff [OPTION]… FILES

DESCRIPTION
Compare files line by line.

-i –ignore-case
Ignore case differences in file contents.

–ignore-file-name-case
Ignore case when comparing file names.

–no-ignore-file-name-case
Consider case when comparing file names.

-E –ignore-tab-expansion
Ignore changes due to tab expansion.

-b –ignore-space-change
Ignore changes in the amount of white space.

-w –ignore-all-space
Ignore all white space.

-B –ignore-blank-lines
Ignore changes whose lines are all blank.

-I RE –ignore-matching-lines=RE
Ignore changes whose lines all match RE.

–strip-trailing-cr
Strip trailing carriage return on input.

-a –text
Treat all files as text.

-c -C NUM –context[=NUM]
Output NUM (default 3) lines of copied context.

-u -U NUM –unified[=NUM]
Output NUM (default 3) lines of unified context.

–label LABEL
Use LABEL instead of file name.

-p –show-c-function
Show which C function each change is in.

-F RE –show-function-line=RE
Show the most recent line matching RE.

-q –brief
Output only whether files differ.

-e –ed
Output an ed script.

–normal
Output a normal diff.

-n –rcs
Output an RCS format diff.

-y –side-by-side
Output in two columns.

-W NUM –width=NUM
Output at most NUM (default 130) print columns.

–left-column
Output only the left column of common lines.

–suppress-common-lines
Do not output common lines.

-D NAME –ifdef=NAME
Output merged file to show `#ifdef NAME’ diffs.

–GTYPE-group-format=GFMT
Similar, but format GTYPE input groups with GFMT.

–line-format=LFMT
Similar, but format all input lines with LFMT.

–LTYPE-line-format=LFMT
Similar, but format LTYPE input lines with LFMT.

LTYPE is `old’, `new’, or `unchanged’.
GTYPE is LTYPE or `changed’.

GFMT may contain:

%< lines from FILE1

%> lines from FILE2

%= lines common to FILE1 and FILE2

%[-][WIDTH][.[PREC]]{doxX}LETTER
printf-style spec for LETTER

LETTERs are as follows for new group, lower case for old group:

F first line number

L last line number

N number of lines = L-F+1

E F-1

M L+1

LFMT may contain:

%L contents of line

%l contents of line, excluding any trailing newline

%[-][WIDTH][.[PREC]]{doxX}n
printf-style spec for input line number

Either GFMT or LFMT may contain:

%% %

%c’C’ the single character C

%c’\OOO’
the character with octal code OOO

-l –paginate
Pass the output through `pr’ to paginate it.

-t –expand-tabs
Expand tabs to spaces in output.

-T –initial-tab
Make tabs line up by prepending a tab.

–tabsize=NUM
Tab stops are every NUM (default 8) print columns.

–suppress-blank-empty
Suppress space or tab before empty output lines.

-r –recursive
Recursively compare any subdirectories found.

-N –new-file
Treat absent files as empty.

–unidirectional-new-file
Treat absent first files as empty.

-s –report-identical-files
Report when two files are the same.

-x PAT –exclude=PAT
Exclude files that match PAT.

-X FILE –exclude-from=FILE
Exclude files that match any pattern in FILE.

-S FILE –starting-file=FILE
Start with FILE when comparing directories.

–from-file=FILE1
Compare FILE1 to all operands. FILE1 can be a directory.

–to-file=FILE2
Compare all operands to FILE2. FILE2 can be a directory.

–horizon-lines=NUM
Keep NUM lines of the common prefix and suffix.

-d –minimal
Try hard to find a smaller set of changes.

–speed-large-files
Assume large files and many scattered small changes.

-v –version
Output version info.

–help Output this help.

FILES are `FILE1 FILE2′ or `DIR1 DIR2′ or `DIR FILE…’ or `FILE…
DIR’. If –from-file or –to-file is given, there are no restrictions
on FILES. If a FILE is `-’, read standard input. Exit status is 0 if
inputs are the same, 1 if different, 2 if trouble.

AUTHOR
Written by Paul Eggert, Mike Haertel, David Hayes, Richard Stallman,
and Len Tower.

REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>.

COPYRIGHT
Copyright © 2007 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for diff is maintained as a Texinfo manual. If
the info and diff programs are properly installed at your site, the
command

info diff

should give you access to the complete manual.

diffutils 2.8.7-cvs January 2008 DIFF(1)

Technorati Tags: ,