| |
|
|
|
|
UniTree Tricks |
Suppose you want to get the first 200 lines of bigFile
and put it into a local file called smallFile. From
an NCSA production machine, issue the command:
% msscmd 'get bigFile "| head -200 > smallFile"'
In UniTree, issue the command:
ftp> get bigFile "| head -200 > smallFile"
From an NCSA production machine, issue the single command:
% msscmd dir cfsinfo|awk 'NF==11 {print "rename cfsinfo/" $11 " ~/" $11}'|mssftp
Yes, create a file called .msscmdrc in your home directory
with the initial sequence of commands you always execute.
This file .msscmdrc is read upon every invocation of msscmd and
the commands in this file are executed prior to any commands
you issue after msscmd.
On your local machine, create a file called ".netrc" in
your home directory. Make sure ONLY YOU have read/write
access to the file. The contents of this file should be:
machine mss.ncsa.uiuc.edu login password
See the man page for netrc for more details.
Next, ftp to an NCSA production machine and get the files
"msscmd". This file is located in the directory
"/usr/local/bin" on all NCSA production machines. (If
you are unable to locate the file, login to an NCSA production
machine and issue the command "which msscmd".)
Give yourself permission to execute these files with the
command:
% chmod u+x msscmd
Edit these files and change references to "mssftp" to
"ftp mss.ncsa.uiuc.edu".
When I retrieve files from UniTree the timestamp is the
current time and not the time the file was created.
The unix utility "tar" preserves the timestamp of files.
See the tar man page for more information.
ftp> quote site LN file1 file2
makes file2 point to file1.
|
|
|
|
|
|