dos2unix

dos2unix

Section: (1)
Updated: dos2unix v3.0
Index
Return to Main Contents


NAME

dos2unix – DOS/MAC to UNIX text file format converter

SYNOPSYS

dos2unix [options] [-c convmode] [-o file ...] [-n infile outfile ...]

Options:

[-hkqV] [--help] [--keepdate] [--quiet] [--version]

DESCRIPTION

This manual page documents dos2unix, the program that converts plain text
files in DOS/MAC format to UNIX format.

OPTIONS

The following options are available:

-h –help

Print online help.

-k –keepdate

Keep the date stamp of output file same as input file.

-q –quiet

Quiet mode. Suppress all warning and messages.

-V –version

Prints version information.

-c –convmode convmode

Sets conversion mode. Where convmode is one of:
ASCII, 7bit, ISO, Mac

with ASCII being the default.
Simulates dos2unix under SunOS.

-o –oldfile file …

Old file mode. Convert the file and write output to it. The program
default to run in this mode. Wildcard names may be used.

-n –newfile infile outfile …

New file mode. Convert the infile and write output to outfile. File names
must be given in pairs and wildcard names should NOT be used or you WILL
lost your files.

EXAMPLES

Get input from stdin and write output to stdout.

dos2unix

Convert and replace a.txt. Convert and replace b.txt.

dos2unix a.txt b.txt
dos2unix -o a.txt b.txt

Convert and replace a.txt in ASCII conversion mode.

dos2unix a.txt -c iso b.txt

Convert and replace b.txt in ISO conversion mode.

dos2unix -c ascii a.txt -c iso b.txt

Convert c.txt from Mac to Unix ascii format.

dos2unix -c mac c.txt b.txt

Convert and replace a.txt while keeping original date stamp.

dos2unix -k a.txt
dos2unix -k -o a.txt

Convert a.txt and write to e.txt.

dos2unix -n a.txt e.txt

Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.

dos2unix -k -n a.txt e.txt 

Convert and replace a.txt. Convert b.txt and write to e.txt.

dos2unix a.txt -n b.txt e.txt
dos2unix -o a.txt -n b.txt e.txt

Convert c.txt and write to e.txt. Convert and replace a.txt.
Convert and replace b.txt. Convert d.txt and write to f.txt.

dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt

DIAGNOSTICS

BUGS

The program does not work properly under MSDOS in stdio processing mode.
If you know why is that so, please tell me.

AUTHORS

Benjamin Lin -
<blin@socs.uts.edu.au>

Bernd Johannes Wuebben (mac2unix mode)
<wuebben@kde.org>

MISCELLANY

Tested environment:

Linux 1.2.0 with GNU C 2.5.8

SunOS 4.1.3 with GNU C 2.6.3

MS-DOS 6.20 with Borland C++ 4.02

Suggestions and bug reports are welcome.

SEE ALSO

unix2dos(1) mac2unix(1)


Index

NAME
SYNOPSYS
DESCRIPTION
OPTIONS
EXAMPLES
DIAGNOSTICS
BUGS
AUTHORS
MISCELLANY
SEE ALSO

This document was created by
man2html,
using the manual pages.

Time: 06:33:23 GMT, July 12, 2011

1+wall

WALL

Section: Linux User’s Manual (1)
Updated: 15 April 2003
IndexReturn to Main Contents


 

NAME

wall — send a message to everybody’s terminal.

 

SYNOPSIS

wall[-n][ message ]

 

DESCRIPTION

Wallsends a message to everybody logged in with theirmesg(1)permissionset toyes.The message can be given as an argument towall,or it can be sent towall‘sstandard input. When using the standard input from a terminal,the message should be terminated with theEOFkey (usually Control-D).

The length of the message is limited to 20 lines.For every invocation ofwalla notification will be written to syslog, with facilityLOG_USERand levelLOG_INFO.

 

OPTIONS

-n
Suppresses the normal banner printed bywall,changing it to "Remote broadcast message".This option is only available for root ifwallis installed set-group-id, and is used byrpc.walld(8).

 

ENVIRONMENT

Wallignores theTZvariable – the time printed in the banner is based on the system’slocal time.

 

SEE ALSO

mesg(1),rpc.rwalld(8).

 

AUTHOR

Miquel van Smoorenburg, miquels@cistron.nl


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT
SEE ALSO
AUTHOR

desc: wall — send a message to everybody’s terminal.

keywords: linux, manual, pages, wall

[tags]linux, manual, pages, wall[/tags]

1+uptime

UPTIME

Section: Linux User’s Manual (1)
Updated: 26 Jan 1993
IndexReturn to Main Contents


 

NAME

uptime – Tell how long the system has been running. 

SYNOPSIS

uptime
uptime [-V] 

DESCRIPTION

uptimegives a one line display of the following information.The current time,how long the system has been running,how many users are currently logged on,and the system load averages for the past 1, 5, and 15 minutes.

This is the same information contained in the header line displayed by w(1). 

FILES

/var/run/utmp information about who is currently logged on
/proc process information 

AUTHORS

uptimewas written by Larry Greenfield <greenfie@gauss.rutgers.edu> and
Michael K. Johnson <johnsonm@sunsite.unc.edu>.

Please send bug reports to <albert@users.sf.net> 

SEE ALSO

ps(1),top(1),utmp(5),w(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
AUTHORS
SEE ALSO

desc: uptime – Tell how long the system has been running.

keywords: linux, manual, pages, uptime

[tags]linux, manual, pages, uptime[/tags]

1+uname

UNAME

Section: User Commands (1)
Updated: March 2009
IndexReturn to Main Contents


 

NAME

uname – print system information 

SYNOPSIS

uname[OPTION]… 

DESCRIPTION

Print certain system information. With no OPTION, same as -s.

-a, –all
print all information, in the following order,except omit -p and -i if unknown:
-s, –kernel-name
print the kernel name
-n, –nodename
print the network node hostname
-r, –kernel-release
print the kernel release
-v, –kernel-version
print the kernel version
-m, –machine
print the machine hardware name
-p, –processor
print the processor type or "unknown"
-i, –hardware-platform
print the hardware platform or "unknown"
-o, –operating-system
print the operating system
–help
display this help and exit
–version
output version information and exit

 

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

arch(1), uname(2)

The full documentation forunameis maintained as a Texinfo manual. If theinfoandunameprograms are properly installed at your site, the command

info uname

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

desc: uname – print system information

keywords: linux, manual, pages, uname

[tags]linux, manual, pages, uname[/tags]

1+true

TRUE

Section: User Commands (1)
Updated: March 2009
IndexReturn to Main Contents


 

NAME

true – do nothing, successfully 

SYNOPSIS

true[ignored command line arguments]
trueOPTION 

DESCRIPTION

Exit with a status code indicating success.

–help
display this help and exit
–version
output version information and exit

NOTE: your shell may have its own version of true, which usually supersedesthe version described here. Please refer to your shell’s documentationfor details about the options it supports. 

AUTHOR

Written by Jim Meyering. 

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 fortrueis maintained as a Texinfo manual. If theinfoandtrueprograms are properly installed at your site, the command

info true

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

desc: true – do nothing, successfully

keywords: linux, manual, pages, true

[tags]linux, manual, pages, true[/tags]

1+tr

TR

Section: User Commands (1)
Updated: March 2009
IndexReturn to Main Contents


 

NAME

tr – translate or delete characters 

SYNOPSIS

tr[OPTION]… SET1 [SET2] 

DESCRIPTION

Translate, squeeze, and/or delete characters from standard input,writing to standard output.

-c, -C, –complement
first complement SET1
-d, –delete
delete characters in SET1, do not translate
-s, –squeeze-repeats
replace each input sequence of a repeated characterthat is listed in SET1 with a single occurrenceof that character
-t, –truncate-set1
first truncate SET1 to length of SET2
–help
display this help and exit
–version
output version information and exit

SETs are specified as strings of characters. Most represent themselves.Interpreted sequences are:

NNN
character with octal value NNN (1 to 3 octal digits)
backslash

audible BEL

backspace
form feed
new line
return
horizontal tab
vertical tab
CHAR1-CHAR2
all characters from CHAR1 to CHAR2 in ascending order
[CHAR*]
in SET2, copies of CHAR until length of SET1
[CHAR*REPEAT]
REPEAT copies of CHAR, REPEAT octal if starting with 0
[:alnum:]
all letters and digits
[:alpha:]
all letters
[:blank:]
all horizontal whitespace
[:cntrl:]
all control characters
[:digit:]
all digits
[:graph:]
all printable characters, not including space
[:lower:]
all lower case letters
[:print:]
all printable characters, including space
[:punct:]
all punctuation characters
[:space:]
all horizontal or vertical whitespace
[:upper:]
all upper case letters
[:xdigit:]
all hexadecimal digits
[=CHAR=]
all characters which are equivalent to CHAR

Translation occurs if -d is not given and both SET1 and SET2 appear.-t may be used only when translating. SET2 is extended to length ofSET1 by repeating its last character as necessary. Excess charactersof SET2 are ignored. Only [:lower:] and [:upper:] are guaranteed toexpand in ascending order; used in SET2 while translating, they mayonly be used in pairs to specify case conversion. -s uses SET1 if nottranslating nor deleting; else squeezing uses SET2 and occurs aftertranslation or deletion. 

AUTHOR

Written by Jim Meyering. 

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 fortris maintained as a Texinfo manual. If theinfoandtrprograms are properly installed at your site, the command

info tr

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

desc: tr – translate or delete characters

new line
return
horizontal tab
vertical tab
CHAR1-CHAR2
all characters from CHAR1 to CHAR2 in ascending order
[CHAR*]
in SET2, copies of CHAR until length of SET1
[CHAR*REPEAT]
REPEAT copies of CHAR, REPEAT octal if starting with 0
[:alnum:]
all letters and digits
[:alpha:]
all letters
[:blank:]
all horizontal whitespace
[:cntrl:]
all control characters
[:digit:]
all digits
[:graph:]
all printable characters, not including space
[:lower:]
all lower case letters
[:print:]
all printable characters, including space
[:punct:]
all punctuation characters
[:space:]
all horizontal or vertical whitespace
[:upper:]
all upper case letters
[:xdigit:]
all hexadecimal digits
[=CHAR=]
all characters which are equivalent to CHAR

Translation occurs if -d is not given and both SET1 and SET2 appear.-t may be used only when translating. SET2 is extended to length ofSET1 by repeating its last character as necessary. Excess charactersof SET2 are ignored. Only [:lower:] and [:upper:] are guaranteed toexpand in ascending order; used in SET2 while translating, they mayonly be used in pairs to specify case conversion. -s uses SET1 if nottranslating nor deleting; else squeezing uses SET2 and occurs aftertranslation or deletion. 

AUTHOR

Written by Jim Meyering. 

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 fortris maintained as a Texinfo manual. If theinfoandtrprograms are properly installed at your site, the command

info tr

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

keywords: linux, manual, pages, tr

[tags]linux, manual, pages, tr[/tags]

1+test

TEST

Section: User Commands (1)
Updated: March 2009
IndexReturn to Main Contents


 

NAME

test – check file types and compare values 

SYNOPSIS

testEXPRESSION
test

[EXPRESSION ]
[]
[OPTION 

DESCRIPTION

Exit with the status determined by EXPRESSION.

--help
display this help and exit
--version
output version information and exit

An omitted EXPRESSION defaults to false. Otherwise,EXPRESSION is true or false and sets exit status. It is one of:

( EXPRESSION )
EXPRESSION is true
! EXPRESSION
EXPRESSION is false
EXPRESSION1 -a EXPRESSION2
both EXPRESSION1 and EXPRESSION2 are true
EXPRESSION1 -o EXPRESSION2
either EXPRESSION1 or EXPRESSION2 is true
-n STRING
the length of STRING is nonzero
STRING
equivalent to -n STRING
-z STRING
the length of STRING is zero
STRING1 = STRING2
the strings are equal
STRING1 != STRING2
the strings are not equal
INTEGER1 -eq INTEGER2
INTEGER1 is equal to INTEGER2
INTEGER1 -ge INTEGER2
INTEGER1 is greater than or equal to INTEGER2
INTEGER1 -gt INTEGER2
INTEGER1 is greater than INTEGER2
INTEGER1 -le INTEGER2
INTEGER1 is less than or equal to INTEGER2
INTEGER1 -lt INTEGER2
INTEGER1 is less than INTEGER2
INTEGER1 -ne INTEGER2
INTEGER1 is not equal to INTEGER2
FILE1 -ef FILE2
FILE1 and FILE2 have the same device and inode numbers
FILE1 -nt FILE2
FILE1 is newer (modification date) than FILE2
FILE1 -ot FILE2
FILE1 is older than FILE2
-b FILE
FILE exists and is block special
-c FILE
FILE exists and is character special
-d FILE
FILE exists and is a directory
-e FILE
FILE exists
-f FILE
FILE exists and is a regular file
-g FILE
FILE exists and is set-group-ID
-G FILE
FILE exists and is owned by the effective group ID
-h FILE
FILE exists and is a symbolic link (same as -L)
-k FILE
FILE exists and has its sticky bit set
-L FILE
FILE exists and is a symbolic link (same as -h)
-O FILE
FILE exists and is owned by the effective user ID
-p FILE
FILE exists and is a named pipe
-r FILE
FILE exists and read permission is granted
-s FILE
FILE exists and has a size greater than zero
-S FILE
FILE exists and is a socket
-t FD
file descriptor FD is opened on a terminal
-u FILE
FILE exists and its set-user-ID bit is set
-w FILE
FILE exists and write permission is granted
-x FILE
FILE exists and execute (or search) permission is granted

Except for -h and -L, all FILE-related tests dereference symbolic links.Beware that parentheses need to be escaped (e.g., by backslashes) for shells.INTEGER may also be -l STRING, which evaluates to the length of STRING.

NOTE: [ honors the --help and --version options, but test does not.test treats each of those as it treats any other nonempty STRING.

NOTE: your shell may have its own version of test and/or [, which usually supersedesthe version described here. Please refer to your shell's documentationfor details about the options it supports. 

AUTHOR

Written by Kevin Braunsdorf and Matthew Bradburn. 

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 fortestis maintained as a Texinfo manual. If theinfoandtestprograms are properly installed at your site, the command

info test

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

desc: test - check file types and compare values

keywords: linux, manual, pages, test

[tags]linux, manual, pages, test[/tags]

1+su

SU

Section: User Commands (1)
Updated: March 2009
IndexReturn to Main Contents


 

NAME

su – run a shell with substitute user and group IDs 

SYNOPSIS

su[OPTION]… [-] [USER [ARG]…] 

DESCRIPTION

Usage: su [OPTION]… [-] [USER [ARG]…]Change the effective user id and group id to that of USER.

-, -l, –login
make the shell a login shell
-c, –command=COMMAND
pass a single COMMAND to the shell with -c
–session-command=COMMAND
pass a single COMMAND to the shell with -cand do not create a new session
-f, –fast
pass -f to the shell (for csh or tcsh)
-m, –preserve-environment
do not reset environment variables
-p
same as -m
-s, –shell=SHELL
run SHELL if /etc/shells allows it
–help
display this help and exit
–version
output version information and exit

A mere – implies -l. If USER not given, assume root. 

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 forsuis maintained as a Texinfo manual. If theinfoandsuprograms are properly installed at your site, the command

info su

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

desc: su – run a shell with substitute user and group IDs

keywords: linux, manual, pages, su

[tags]linux, manual, pages, su[/tags]

1+strings

STRINGS

Section: GNU Development Tools (1)
Updated: 2009-02-02
IndexReturn to Main Contents


 

NAME

strings – print the strings of printable characters in files. 

SYNOPSIS

strings [-afov] [-min-len]
        [-n min-len] [--bytes=min-len]
        [-t radix] [--radix=radix]
        [-e encoding] [--encoding=encoding]
        [-] [--all] [--print-file-name]
        [-T bfdname] [--target=bfdname]
        [--help] [--versionfile 

DESCRIPTION

For each file given, GNU strings prints the printablecharacter sequences that are at least 4 characters long (or the numbergiven with the options below) and are followed by an unprintablecharacter. By default, it only prints the strings from the initializedand loaded sections of object files; for other types of files, it printsthe strings from the whole file.

strings is mainly useful for determining the contents of non-textfiles. 

OPTIONS

-a
–all
-
Do not scan only the initialized and loaded sections of object files;scan the whole files.
-f
–print-file-name
Print the name of the file before each string.
–help
Print a summary of the program usage on the standard output and exit.
-min-len
-n min-len
–bytes=min-len
Print sequences of characters that are at least min-len characterslong, instead of the default 4.
-o
Like -t o. Some other versions of strings have -oact like -t d instead. Since we can not be compatible with bothways, we simply chose one.
-t radix
–radix=radix
Print the offset within the file before each string. The singlecharacter argument specifies the radix of the offset—o foroctal, x for hexadecimal, or d for decimal.
-e encoding
–encoding=encoding
Select the character encoding of the strings that are to be found.Possible values for encoding are: s = single-7-bit-bytecharacters (ASCII, ISO 8859, etc., default), S =single-8-bit-byte characters, b = 16-bit bigendian, l =16-bit littleendian, B = 32-bit bigendian, L = 32-bitlittleendian. Useful for finding wide character strings.
-T bfdname
–target=bfdname
Specify an object code format other than your system’s default format.
-v
–version
Print the program version number on the standard output and exit.
@file
Read command-line options from file. The options read areinserted in place of the original @file option. If filedoes not exist, or cannot be read, then the option will be treatedliterally, and not removed.

Options in file are separated by whitespace. A whitespacecharacter may be included in an option by surrounding the entireoption in either single or double quotes. Any character (including abackslash) may be included by prefixing the character to be includedwith a backslash. The file may itself contain additional@file options; any such options will be processed recursively.

 

SEE ALSO

ar(1), nm(1), objdump(1), ranlib(1), readelf(1)and the Info entries for binutils. 

COPYRIGHT

Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.2or any later version published by the Free Software Foundation;with no Invariant Sections, with no Front-Cover Texts, and with noBack-Cover Texts. A copy of the license is included in thesection entitled “GNU Free Documentation License”.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
COPYRIGHT

desc: strings – print the strings of printable characters in files.

keywords: linux, manual, pages, strings

[tags]linux, manual, pages, strings[/tags]

1+rdist

RDIST

Section: User Commands (1)
Updated: June 13, 1998
IndexReturn to Main Contents


 

NAME

rdist – remote file distribution client program 

SYNOPSIS

rdist[ -DFn][ -A num] [ -a num ][ -d var=value ] [ -l<local logopts>] [ -L<remote logopts>] [ -f distfile ] [ -M maxproc] [ -m host ][ -odistopts][ -t timeout ] [-p<rdistd-path>][-P<transport-path>][ name ...]

rdist-DFn-c name … [login@]host[:dest]

rdist-Server

rdist-V 

DESCRIPTION

Rdistis a program to maintain identical copies of files over multiple hosts. It preserves the owner, group, mode, and mtime of files if possible andcan update programs that are executing.Rdistreads commands fromdistfileto direct the updating of files and/or directories.Ifdistfileis `-’, the standard input is used.If no-foption is present, the program looks first for `distfile’,then `Distfile’ to use as the input.If no names are specified on the command line,rdistwill update all of the files and directories listed indistfile.Otherwise, the argument is taken to be the name of a file to be updatedor the label of a command to execute. If label and file names conflict,it is assumed to be a label.These may be used together to update specific filesusing specific commands.

The-coption forcesrdistto interpret the remaining arguments as a smalldistfile.The equivalent distfile is as follows.

     ( name ... ) -> [login@]host          install       [dest] ;

The-Serveroption is recognized to provide partial backward compatible supportfor older versions ofrdistwhich used this option to putrdistinto server mode.Ifrdistis started with the -Servercommand line option, it will attempt to exec (run) the old version ofrdist.This option will only work if rdistwas compiled with the location of the old rdist(the path/usr/bin/oldrdistis used on Red Hat linux)and that program is available at run time.

Rdistcan use either thercmd(3)function call or run an arbitrary transport program such asrsh(1c)to access each target host.The method used is selected at compile-time.However, if the later method is used, the transport program can bespecified at run-time on the command line with the default being rsh(1c).If thersh(1c)method is used andthe target host is the stringlocalhostand the remote user name is the same as the local user name,rdistwill run the command

/bin/sh -c rdistd -S

Otherwiserdistrun will run the command

rsh host -l remuser rdistd -S

where hostis the name of the target host,remuseris the name of the user to make the connection as and,rdistdis the rdist server command on the target host as shown below.To use a transport program other thanrsh(1c)use the -Poption.Whatever transport program is used, must be compatible with the abovespecified syntax forrsh(1c).If the transport program is not, it should be wrappedin a shell script which does understand this command line syntax andwhich then executes the real transport program.

Here’s an example which uses ssh(1)as the transport:

rdist -P /usr/local/bin/ssh -f myDistfile

If thercmd(3) method is used, thenrdistmakes the connection to the target host itself and runsthe rdistdserver program as shown below.The default, and preferred method, is to usersh(1c)to make the connection to target hosts. This allows rdistto be run without being setuid to “root”.

On each target hostRdistwill attempt to run the command

rdistd -S

or

<rdistd path> -S

if the-poption was specified.If no-p option is included,or the<rdistd path>is a simple filename,rdistdor<rdistd path>must be somewhere in the $PATHof the user runningrdiston the remote (target) host. 

OPTIONS

-A num
Set the minimum number of free files (inodes) on a filesystem that must existfor rdistto update or install a file.
-a num
Set the minimum amount of free space (in bytes) on a filesystem that must existfor rdistto update or install a file.
-D
Enable copious debugging messages.
-d var=value
Definevarto havevalue.Thisoption is used to define or override variable definitions in thedistfile.Valuecan be the empty string, one name, or a list of names surrounded byparentheses and separated by tabs and/or spaces.
-F
Do not fork any child rdistprocesses.All clients are updated sequentially.
-f distfile
Set the name of the distfile to use to bedistfile .If distfileis specified as“-” (dash)then read from standard input (stdin).
-l logopts
Set local logging options.See the section MESSAGE LOGGINGfor details on the syntax forlogopts.
-L logopts
Set remote logging options.logoptsis the same as for local loggingexcept the values are passed to the remoteserver (rdistd).See the section MESSAGE LOGGINGfor details on the syntax forlogopts.
-M num
Set the maximum number of simultaneouslyrunning childrdistprocesses tonum.The default is 4.
-m machine
Limit which machines are to be updated. Multiple-marguments can be given to limit updates to a subset of the hosts listed in thedistfile.
-n
Print the commands without executing them. This option isuseful for debuggingdistfile.
-odistopts
Specify the dist options to enable.distoptsis a comma separated list of options which are listed below.The valid values fordistoptsare:
verify
Verify that the files are up to date on all the hosts. Any filesthat are out of date will be displayed but no files will be changednor any mail sent.
whole
Whole mode. The whole file name is appended to the destination directoryname. Normally, only the last component of a name is used when renaming files.This will preserve the directory structure of the files beingcopied instead of flattening the directory structure. For example,rdisting a list of files such as/path/dir1/f1 and/path/dir2/f2 to /tmp/dir would createfiles /tmp/dir/path/dir1/f1 and /tmp/dir/path/dir2/f2 instead of /tmp/dir/dir1/f1 and /tmp/dir/dir2/f2.
noexec
Automatically exclude executable files that are in a.out(5)format from bei
ng checked or updated.
younger
Younger mode. Files are normally updated if theirmtimeandsize(seestat(2))disagree. Thisoption causesrdistnot to update files that are younger than the master copy.This can be usedto prevent newer copies on other hosts from being replaced.A warning message is printed for files which are newer than the master copy.
compare
Binary comparison. Perform a binary comparison and update files if they differrather than comparing dates and sizes.
follow
Follow symbolic links. Copy the file that the link points to rather than thelink itself.
ignlnks
Ignore unresolved links.Rdistwill normally try to maintain the link structure of files being transferredand warn the user if all the links cannot be found.
chknfs
Do not check or update files on target host thatreside on NFS filesystems.
chkreadonly
Enable check on target hostto see if a file resides on a read-only filesystem.If a file does, then no checking or updating of the file is attempted.
chksym
If the target on the remote host is a symbolic link, but is not on themaster host, the remote target will be left a symbolic link.This behavior is generally considered a bug in the original version ofrdist,but is present to allow compatibility with older versions.
quiet
Quiet mode. Files that are being modified are normallyprinted on standard output. Thisoption suppresses this.
remove
Remove extraneous files. If a directory is being updated, any files that existon the remote host that do not exist in the master directory are removed.This is useful for maintaining truly identical copies of directories.
nochkowner
Do not check user ownership of files that already exist.The file ownership is only set when the file is updated.
nochkgroup
Do not check group ownership of files that already exist.The file ownership is only set when the file is updated.
nochkmode
Do not check file and directory permission modes.The permission mode is only set when the file is updated.
nodescend
Do not descend into a directory.Normally rdistwill recursively check directories.If this option is enabled, then any files listed in thefile list in the distfile that are directories are not recursively scanned.Only the existence, ownership, and mode of the directory are checked.
numchkgroup
Use the numeric group id (gid) to check group ownership instead ofthe group name.
numchkowner
Use the numeric user id (uid) to check user ownership instead ofthe user name.
savetargets
Save files that are updated instead of removing them.Any target file that is updates is first rename fromfiletofile.OLD.
sparse
Enable checking for sparse (aka wholely) files. One of the mostcommon types of sparse files are those produced byndbm(3).This option adds some additional processing overhead so it shouldonly be enabled for targets likely to contain sparse files.
-p <rdistd-path>
Set the path where the rdistd server is searched for on the target host.
-P <transport-path>
Set the path to the transport command to be used.This is normallyrsh(1c)but can be any other program – such as ssh(1) -which understands rsh(1c)command line syntax and which provides an appropriate connection to theremote host.Thetransport-pathmay be a colon seperated list of possible pathnames.In this case, the first component of the path to exist is used.i.e. /usr/ucb/rsh:/usr/bin/remsh,/usr/bsd/rsh.
-t timeout
Set the timeout period (in seconds) for waiting for responses from the remote rdistserver.The default is 900 seconds.
-V
Print version information and exit.

 

MESSAGE LOGGING

Rdistuses a collection of predefined messagefacilitiesthat each contain a list of messagetypesspecifying which types of messages to send to that facility.The local client (rdist) and the remote server (rdistd) eachmaintaintheir own copy of what types of messages to log to what facilities.

The -llogoptsoption tordisttellsrdistwhat logging options to use locally.The -Llogoptsoption tordisttellsrdistwhat logging options to pass to the remoterdistdserver.

The form oflogoptsshould be of form

facility=types:facility=types…

The valid facility names are:

stdout
Messages to standard output.
file
Log to a file. To specify the file name, use the format “file=filename=types”.e.g.“file=/tmp/rdist.log=all,debug”.
syslog
Use the syslogd(8)facility.
notify
Use the internalrdistnotifyfacility.This facility is used in conjunction with thenotifykeyword in a distfileto specify what messages are mailed to thenotifyaddress.

typesshould be a comma separated list of message types. Each message type specified enables that message level. This is unlike thesyslog(3)system facility which uses an ascending order scheme.The followingare the valid types:

change
Things that change.This includes files that are installed or updated in some way.
info
General information.
notice
General info about things that change.This includes things like making directories which are needed in orderto install a specific target, but which are not explicitly specified inthedistfile.
nerror
Normal errors that are not fatal.
ferror
Fatal errors.
warning
Warnings about errors which are not as serious asnerrortype messages.
debug
Debugging information.
all
All but debug messages.

Here is a sample command line option:

-l stdout=all:syslog=change,notice:file=/tmp/rdist.log=all

This entry will set local message logging to have all but debugmessages sent to standard output, change and notice messages willbe sent to syslog(3),and all messages will be written to the file/tmp/rdist.log. 

DISTFILES

Thedistfilecontains a sequence of entries that specify the filesto be copied, the destination hosts, and what operations to performto do the updating. Each entry has one of the following formats.

<variable name> `=' <name list>[ label: ] <source list> `->' <destination list> <command list>[ label: ] <source list> `::' <time_stamp file> <command list>

The first format is used for defining variables.The second format is used for distributing files to other hosts.The third format is used for making lists of files that have been changedsince some given date.The source list specifies alist of files and/or directories on the local host which are to be usedas the master copy for distribution.The destination list is the list of hosts to which these files are to becopied. Each file in the source list is added to a list of changesif the file is out of date on the host which is being updated (second format) orthe file is newer than the time stamp file (third format).

Labels are optional. They are used to identify a command for partial updates.

Newlines, tabs, and blanks are only used as separators and areotherwise ignored. Comments begin with `#’ and end with a newline.

Variables to be expanded begin with `$’ followed by one character ora name enclosed in curly braces (see the examples at the end).

The source and destination lists have the following format:

     <name>or     `(' <zero or more names separated by white-space> `)'

These simple lists can be modified by using one level of set addition,subtraction, or intersection like this:

     list '-' listor     list '+' listor     list '&' list

If additional modifications are needed (e.g., “all servers and clientmachines except for the OSF/1 machines”) then the list will haveto be explicitly constructed in steps using "temporary" variables.

The shell meta-characters `[', `]‘, `{‘, `}’, `*’, and `’are recognized and expanded (on the local host only) in the same way ascsh(1).They can be escaped with a backslash.The `~’ character is also expanded in the same way ascshbut is expanded separately on the local and destination hosts.When the-owholeoption is used with a file name that begins with `~’, everything except thehome directory is appended to the destination name.File names which do not begin with `/’ or `~’ use the destination user’shome directory as the root directory for the rest of the file name.

The command list consists of zero or more commands of the followingformat.

`install' <options> opt_dest_name `;'`notify' <name list> `;'`except' <name list> `;'`except_pat' <pattern list>`;'`special' <name list> string `;'`cmdspecial' <name list> string `;'

Theinstallcommand is used to copy out of date files and/or directories.Each source file is copied to each host in the destination list.Directories are recursively copied in the same way.Opt_dest_nameis an optional parameter to rename files.If noinstallcommand appears in the command list orthe destination name is not specified,the source file name is used.Directories in the path name will be created if theydo not exist on the remote host.The-o distoptsoptionas specified above underOPTIONS,has the same semantics ason the command line except they only apply to the filesin the source list.The login name used on the destination host is the same as the local hostunless the destination name is of the format “login@host".

Thenotifycommand is used to mail the list of files updated (and any errorsthat may have occurred) to the listed names.If no `@’ appears in the name, the destination host is appended tothe name(e.g., name1@host, name2@host, …).

Theexceptcommand is used to update all of the files in the source listexceptfor the files listed in name list.This is usually used to copy everything in a directory except certain files.

Theexcept_patcommand is like theexceptcommand except that pattern list is a list of regular expressions(seeed(1)for details).If one of the patterns matches some string within a file name, that file willbe ignored.Note that since `’ is a quote character, it must be doubled to becomepart of the regular expression. Variables are expanded in pattern listbut not shell file pattern matching characters. To include a `$’, itmust be escaped with `’.

Thespecialcommand is used to specifysh(1)commands that are to be executed on theremote host after the file in name list is updated or installed.If the name list is omitted then the shell commands will be executedfor every file updated or installed. Stringstarts and ends with `"’ and can cross multiple lines indistfile.Multiple commands to the shell should be separated by `;’.Commands are executed in the user’s home directory on the hostbeing updated.Thespecialcommand can be used to rebuild private databases, etc.after a program has been updated.The following environment variables are set for each specialcommand:

FILE
The full pathname of the local file that was just updated.
REMFILE
The full pathname of the remote file that was just updated.
BASEFILE
The basename of the remote file that was just updated.

Thecmdspecialcommand is similar to thespecialcommand, except it is executed only when the entire command is completedinstead of after each file is updated.The list of files is placed in the environment variable $FILES.Each file name in$FILESis separated by a `:’ (colon).

If a hostname ends in a “+” (plus sign), then the plusis stripped off and NFS checks are disabled.This is equivalent to disabling the-ochknfsoption just for this one host.

The following is a small example.

HOSTS = ( matisse root@arpa)FILES = ( /bin /lib /usr/bin /usr/games /usr/include/{*.h,{stand,sys,vax*,pascal,machine}/*.h} /usr/lib /usr/man/man /usr/ucb /usr/local/rdist )EXLIB = ( Mail.rc aliases aliases.dir aliases.pag crontab dshrc sendmail.cf sendmail.fc sendmail.hf sendmail.st uucp vfont )${FILES} -> ${HOSTS} install -oremove,chknfs ; except /usr/lib/${EXLIB} ; except /usr/games/lib ; special /usr/lib/sendmail "/usr/lib/sendmail -bz" ;srcs:/usr/src/bin -> arpa except_pat ( .o$ /SCCS$ ) ;IMAGEN = (ips dviimp catdvi)imagen:/usr/local/${IMAGEN} -> arpa install /usr/local/lib ; notify ralph ;${FILES} :: stamp.cory notify root@cory ;

 

ENVIRONMENT

TMPDIR
Name of temporary directory to use. Default is /tmp.

 

FILES

distfile       - input command file$TMPDIR/rdist* - temporary file for update lists

 

SEE ALSO

sh(1),csh(1),stat(2),rsh(1c),rcmd(3) 

DIAGNOSTICS

 

NOTES

If the basename of a file (the last component in the pathname)is ".", then rdist assumes the remote (destination) name is a directory.i.e./tmp/.means that/tmpshould be a directory on the remote host.

The following options are still recognized for backwards compatibility:

-v -N -O -q -b -r -R -s -w -y -h -i -x

 

BUGS

Source files must reside on the local host where rdist is executed.

Variable expansion only works for name lists; there should be a general macrofacility.

Rdistaborts on files which have a negative mtime (before Jan 1, 1970).

If a hardlinked file is listed more than once in the same target,then rdist will report missing links.Only one instance of a link should be listed in each target.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
MESSAGE LOGGING
DISTFILES
ENVIRONMENT
FILES
SEE ALSO
DIAGNOSTICS
NOTES
BUGS

desc: rdist – remote file distribution client program

keywords: linux, manual, pages, rdist

[tags]linux, manual, pages, rdist[/tags]