Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script

Status
Not open for further replies.

kumariaru

IS-IT--Management
Mar 9, 2006
61
0
0
AU
Hi All..
I have a script used in process. I want to Know exactly what this is doing:

if [[ $cmd = "put" || $cmd = "append" ]]; then
echo "open $server
user $user $pwd
cd $tdir
$cmd $files
quote site chmod 666 $files
quit " | ftp -n -v > putfiles${jobid}.log
fi

This script is ft' ing a file from one server to other server(to put a file). I want to know extactly what chmod is doing in above script.

Thank you


 
It would appear to be setting permissions to 666 (-rw-rw-rw) on the remote server for the files that have been put or appended.

That is, if the remote server supports the chmod command.

You can probably see if it works by reading the putfiles${jobid}.log file.



Rod Knowlton

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
I tried doing and it worked:

ftp> quote site chmod 666 hi
200 CHMOD command successful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top