From e8ce0a6e30de6112071ec1b496333c7d394167ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 2 Nov 2007 22:45:37 +0000 Subject: [PATCH] Make the smbclient man page match the internal command list. Jeremy. --- docs/manpages-3/smbclient.1.xml | 442 +++++++++++++++++++++++++++------------- 1 file changed, 297 insertions(+), 145 deletions(-) diff --git a/docs/manpages-3/smbclient.1.xml b/docs/manpages-3/smbclient.1.xml index b16c00771d6..d98bfe7196e 100644 --- a/docs/manpages-3/smbclient.1.xml +++ b/docs/manpages-3/smbclient.1.xml @@ -502,27 +502,50 @@ ? [command] - If command is specified, the ? command will display - a brief informative message about the specified command. If no + If command is specified, the ? command will display + a brief informative message about the specified command. If no command is specified, a list of available commands will be displayed. - + ! [shell command] - If shell command is specified, the ! - command will execute a shell locally and run the specified shell - command. If no command is specified, a local shell will be run. + If shell command is specified, the ! + command will execute a shell locally and run the specified shell + command. If no command is specified, a local shell will be run. - + altname file The client will request that the server return the "alternate" name (the 8.3 name) for a file or directory. - + + + archive <number> + Sets the archive level when operating on files. + 0 means ignore the archive bit, 1 means only operate on files with this bit set, + 2 means only operate on files with this bit set and reset it after operation, + 3 means operate on all files and reset it after operation. The default is 0. + + + + + blocksize <number> + Sets the blocksize parameter for a tar operation. The default is 20. + Causes tar file to be written out in blocksize*TBLOCK (normally 512 byte) units. + + + + + cancel jobid0 [jobid1] ... [jobidN] + The client will request that the server cancel + the printjobs identified by the given numeric print job ids. + + + case_sensitive Toggles the setting of the flag in SMB packets that @@ -532,14 +555,18 @@ parameter set to auto in the smb.conf. - + - cancel jobid0 [jobid1] ... [jobidN] - The client will request that the server cancel - the printjobs identified by the given numeric print job ids. - + cd <directory name> + If "directory name" is specified, the current + working directory on the server will be changed to the directory + specified. This operation will fail if for any reason the specified + directory is inaccessible. + + If no directory name is specified, the current working + directory on the server will be reported. - + chmod file mode in octal This command depends on the server supporting the CIFS @@ -547,7 +574,7 @@ change the UNIX permissions to the given octal mode, in standard UNIX format. - + chown file uid gid This command depends on the server supporting the CIFS @@ -557,64 +584,101 @@ This may be addressed in future versions of the CIFS UNIX extensions. - - - cd [directory name] - If "directory name" is specified, the current - working directory on the server will be changed to the directory - specified. This operation will fail if for any reason the specified - directory is inaccessible. - If no directory name is specified, the current working - directory on the server will be reported. + + close <fileid> + Closes a file explicitly opened by the open command. Used for + internal Samba testing purposes. + - + del <mask> - The client will request that the server attempt - to delete all files matching mask from the current working + The client will request that the server attempt + to delete all files matching mask from the current working directory on the server. - + dir <mask> - A list of the files matching mask in the current - working directory on the server will be retrieved from the server + A list of the files matching mask in the current + working directory on the server will be retrieved from the server and displayed. - + + + du <filename> + Does a directory listing and then prints out the current disk useage and free space on a share. + + + + + echo <number> <data> + Does an SMBecho request to ping the server. Used for internal Samba testing purposes. + + + exit - Terminate the connection with the server and exit - from the program. + Terminate the connection with the server and exit + from the program. - + get <remote file name> [local file name] - Copy the file called remote file name from - the server to the machine running the client. If specified, name - the local copy local file name. Note that all transfers in - smbclient are binary. See also the + Copy the file called remote file name from + the server to the machine running the client. If specified, name + the local copy local file name. Note that all transfers in + smbclient are binary. See also the lowercase command. - + + + getfacl <filename> + Requires the server support the UNIX extensions. Requests and prints + the POSIX ACL on a file. + + + + + hardlink <src> <dest< + Creates a hardlink on the server using Windows CIFS semantics. + the POSIX ACL on a file. + + + help [command] See the ? command above. - + + + history Displays the command history. + + + + iosize <bytes> + When sending or receiving files, smbclient uses an + internal memory buffer by default of size 64512 bytes. This command + allows this size to be set to any range between 16384 (0x4000) bytes + and 16776960 (0xFFFF00) bytes. Larger sizes may mean more efficient + data transfer as smbclient will try and use the most efficient + read and write calls for the connected server. + + + lcd [directory name] - If directory name is specified, the current - working directory on the local machine will be changed to - the directory specified. This operation will fail if for any + If directory name is specified, the current + working directory on the local machine will be changed to + the directory specified. This operation will fail if for any reason the specified directory is inaccessible. - - If no directory name is specified, the name of the - current working directory on the local machine will be reported. + + If no directory name is specified, the name of the + current working directory on the local machine will be reported. - + link target linkname This command depends on the server supporting the CIFS @@ -625,163 +689,236 @@ + listconnect + Show the current connections held for DFS purposes. + + + + + lock <filenum> <r|w> <hex-start> <hex-len> + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. Tries to set a POSIX + fcntl lock of the given type on the given range. Used for internal Samba testing purposes. + + + + + logon <username> <password> + Establishes a new vuid for this session by logging on again. + Replaces the current vuid. Prints out the new vuid. Used for internal Samba testing purposes. + + + + lowercase - Toggle lowercasing of filenames for the get and - mget commands. - - When lowercasing is toggled ON, local filenames are converted + Toggle lowercasing of filenames for the get and + link target linkname + + When lowercasing is toggled ON, local filenames are converted to lowercase when using the get and mget commands. This is - often useful when copying (say) MSDOS files from a server, because + often useful when copying (say) MSDOS files from a server, because lowercase filenames are the norm on UNIX systems. - + ls <mask> See the dir command above. - + mask <mask> - This command allows the user to set up a mask - which will be used during recursive operation of the mget and + This command allows the user to set up a mask + which will be used during recursive operation of the mget and mput commands. - The masks specified to the mget and mput commands act as - filters for directories rather than files when recursion is + The masks specified to the mget and mput commands act as + filters for directories rather than files when recursion is toggled ON. - - The mask specified with the mask command is necessary + + The mask specified with the mask command is necessary to filter files within those directories. For example, if the - mask specified in an mget command is "source*" and the mask - specified with the mask command is "*.c" and recursion is - toggled ON, the mget command will retrieve all files matching - "*.c" in all directories below and including all directories + mask specified in an mget command is "source*" and the mask + specified with the mask command is "*.c" and recursion is + toggled ON, the mget command will retrieve all files matching + "*.c" in all directories below and including all directories matching "source*" in the current working directory. - Note that the value for mask defaults to blank (equivalent - to "*") and remains so until the mask command is used to change it. - It retains the most recently specified value indefinitely. To - avoid unexpected results it would be wise to change the value of + Note that the value for mask defaults to blank (equivalent + to "*") and remains so until the mask command is used to change it. + It retains the most recently specified value indefinitely. To + avoid unexpected results it would be wise to change the value of mask back to "*" after using the mget or mput commands. - + md <directory name> See the mkdir command. - + mget <mask> - Copy all files matching mask from the server to + Copy all files matching mask from the server to the machine running the client. - Note that mask is interpreted differently during recursive - operation and non-recursive operation - refer to the recurse and - mask commands for more information. Note that all transfers in + Note that mask is interpreted differently during recursive + operation and non-recursive operation - refer to the recurse and + mask commands for more information. Note that all transfers in smbclient are binary. See also the lowercase command. - + mkdir <directory name> - Create a new directory on the server (user access + Create a new directory on the server (user access privileges permitting) with the specified name. - + + + more <file name> + Fetch a remote file and view it with the contents + of your PAGER environment variable. + + + mput <mask> - Copy all files matching mask in the current working - directory on the local machine to the current working directory on + Copy all files matching mask in the current working + directory on the local machine to the current working directory on the server. - - Note that mask is interpreted differently during recursive - operation and non-recursive operation - refer to the recurse and mask - commands for more information. Note that all transfers in smbclient + + Note that mask is interpreted differently during recursive + operation and non-recursive operation - refer to the recurse and mask + commands for more information. Note that all transfers in smbclient are binary. - + + + posix + Query the remote server to see if it supports the CIFS UNIX + extensions and prints out the list of capabilities supported. If so, turn + on POSIX pathname processing and large file read/writes (if available),. + + + + + posix_open <filename> <octal mode> + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. Opens a remote file + using the CIFS UNIX extensions and prints a fileid. Used for internal Samba + testing purposes. + + + + + posix_mkdir <directoryname> <octal mode> + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. Creates a remote directory + using the CIFS UNIX extensions with the given mode. + + + + + posix_rmdir <directoryname> + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. Deletes a remote directory + using the CIFS UNIX extensions. + + + + + posix_unlink <filename> + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. Deletes a remote file + using the CIFS UNIX extensions. + + + print <file name> - Print the specified file from the local machine + Print the specified file from the local machine through a printable service on the server. - + prompt - Toggle prompting for filenames during operation + Toggle prompting for filenames during operation of the mget and mput commands. - When toggled ON, the user will be prompted to confirm - the transfer of each file during these commands. When toggled - OFF, all specified files will be transferred without prompting. + When toggled ON, the user will be prompted to confirm + the transfer of each file during these commands. When toggled + OFF, all specified files will be transferred without prompting. - + put <local file name> [remote file name] - Copy the file called local file name from the + Copy the file called local file name from the machine running the client to the server. If specified, - name the remote copy remote file name. Note that all transfers - in smbclient are binary. See also the lowercase command. + name the remote copy remote file name. Note that all transfers + in smbclient are binary. See also the lowercase command. - + queue - Displays the print queue, showing the job id, + Displays the print queue, showing the job id, name, size and current status. - + quit See the exit command. - + rd <directory name> See the rmdir command. - + recurse - Toggle directory recursion for the commands mget + Toggle directory recursion for the commands mget and mput. - - When toggled ON, these commands will process all directories + + When toggled ON, these commands will process all directories in the source directory (i.e., the directory they are copying - from ) and will recurse into any that match the mask specified - to the command. Only files that match the mask specified using - the mask command will be retrieved. See also the mask command. + from ) and will recurse into any that match the mask specified + to the command. Only files that match the mask specified using + the mask command will be retrieved. See also the mask command. - When recursion is toggled OFF, only files from the current - working directory on the source machine that match the mask specified - to the mget or mput commands will be copied, and any mask specified + When recursion is toggled OFF, only files from the current + working directory on the source machine that match the mask specified + to the mget or mput commands will be copied, and any mask specified using the mask command will be ignored. - + rm <mask> - Remove all files matching mask from the current + Remove all files matching mask from the current working directory on the server. - + rmdir <directory name> - Remove the specified directory (user access + Remove the specified directory (user access privileges permitting) from the server. - + setmode <filename> <perm=[+|\-]rsha> - A version of the DOS attrib command to set + A version of the DOS attrib command to set file permissions. For example: setmode myfile +r - + would make myfile read only. - + + showconnect + Show the currently active connection held for DFS purposes. + + stat file @@ -795,64 +932,79 @@ - - symlink target linkname This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not. The client requests that the server create a symbolic hard link between the target and linkname files. The linkname file - must not exist. Note that the server will not create a link to any path that lies + must not exist. Note that the server will not create a link to any path that lies outside the currently connected share. This is enforced by the Samba server. - - tar <c|x>[IXbgNa] Performs a tar operation - see the -T - command line option above. Behavior may be affected - by the tarmode command (see below). Using g (incremental) and N - (newer) will affect tarmode settings. Note that using the "-" option - with tar x may not work - use the command line option instead. + command line option above. Behavior may be affected + by the tarmode command (see below). Using g (incremental) and N + (newer) will affect tarmode settings. Note that using the "-" option + with tar x may not work - use the command line option instead. - - + blocksize <blocksize> - Blocksize. Must be followed by a valid (greater - than zero) blocksize. Causes tar file to be written out in + Blocksize. Must be followed by a valid (greater + than zero) blocksize. Causes tar file to be written out in blocksize*TBLOCK (usually 512 byte) blocks. - - + tarmode <full|inc|reset|noreset> - Changes tar's behavior with regard to archive - bits. In full mode, tar will back up everything regardless of the - archive bit setting (this is the default mode). In incremental mode, - tar will only back up files with the archive bit set. In reset mode, - tar will reset the archive bit on all files it backs up (implies + Changes tar's behavior with regard to archive + bits. In full mode, tar will back up everything regardless of the + archive bit setting (this is the default mode). In incremental mode, + tar will only back up files with the archive bit set. In reset mode, + tar will reset the archive bit on all files it backs up (implies read/write share). - - + + + unlock <filenum> <hex-start> <hex-len> + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. Tries to unlock a POSIX + fcntl lock on the given range. Used for internal Samba testing purposes. + + + + + volume + Prints the current volume name of the share. + + + + + vuid <number> + Changes the currently used vuid in the protocol to + the given arbitrary number. Without an argument prints out the current + vuid being used. Used for internal Samba testing purposes. + + + NOTES - Some servers are fussy about the case of supplied usernames, - passwords, share names (AKA service names) and machine names. - If you fail to connect try giving all parameters in uppercase. + Some servers are fussy about the case of supplied usernames, + passwords, share names (AKA service names) and machine names. + If you fail to connect try giving all parameters in uppercase. - - It is often necessary to use the -n option when connecting - to some types of servers. For example OS/2 LanManager insists - on a valid NetBIOS name being used, so you need to supply a valid + + It is often necessary to use the -n option when connecting + to some types of servers. For example OS/2 LanManager insists + on a valid NetBIOS name being used, so you need to supply a valid name that would be known to the server. smbclient supports long file names where the server -- 2.11.4.GIT