ARJO SEGERS
KNMI, The Netherlands
Date: 3 March 2009
gss <task> [<options>] [<location> ...]
Shell script to access file systems, tape systems, ftp servers, and other file archives in a uniform way.
list [-l,--long] [<location> ...]
File or directory listing.
If no location is specified, the current directory is listed.
Use the '-l' option for long listing.
exist [-e,--echo] <location>
Returns with zero exit status (succeed) if the location exists,
and non-zero (fail) if not.
With the '-e' option, the csh status '1' (succeed) is echo'd
to standard output if the location exists and '0' (fail) if not;
the script always succeeds.
copy [-f,--force] [-m,--mkdir] <source-location> <dest-location>
Copy source file to destionation.
-f, --force : overwrite existing destination files if necessary
-m, --mkdir : create destination directories if necessary
link [-s,--soft] [-f,--force] [-n,--new] <remote-location> <localfile>
unlink <localfile>
Create a symbolic link with name <localfile> to a so-called 'linkfile'
with name '.*.gsslink'.
The 'linkfile' is copy from or a symbolic link to the file specified
by <remote-location> .
If the <localfile> is unlinked, both the <localfile> and the
'linkfile' are removed.
In case of a 'hard' link (default), the original location is written
to a file named '.*.gsslinksrc'; if a hard link is removed,
and the linkfile is a copy of a remote file,
the remote file is replaced by the (changed) local copy.
local remote
-------------------------------------- ---------------------
data-a.dat -> ._data_a_dat.gsslink
._data_a.dat.gsslink -> /data/a.dat /data/a.dat
data-b.dat -> .tape_b_dat.gsslink
.tape_b_dat.gsslink tape:b.dat
.tape_b_dat.gsslinksrc
Options:
-s, --soft : create soft link
-f, --force : overwrite existing destination files if necessary
-n, --new : create new empty file if necessary
tar-extract <tarfile> [<tarred-file>]
Extract the <tarred-file> from a tarfile or untar the tarfile completely.
tar-update <tarfile> <input-file>
Update the <input-file> in a (linked) tar file.
An old version of <input-file> is removed from the tarfile.
limit <max-usage> <directory>
If the disk usage of the <directory-location> exceeds the <max-usage>,
files that have not been touched recently are removed until the
disk usage is small enought.
A valid <max-usage> is a number followed by a character
to specify kilo (default), mega, or giga bytes,
or 'Inf' to not have any limitation (case independent):
100, 100k, 2m, 4g, Inf
# # standard files # file:path/file # # KNMI's MOS tape system # mos:/fa/ks/file mos:umask=002%/fa/ks/data/a.txt # # ECMWF's ecfs # ecfs:/nl5/data/a.txt ecfs:/TMP/nl5/dump.txt ecfs:umask=002%/nlh/shared/a.txt # # ECMWF file system via EcAccess gateway # ec:echome[nl5]:path/file ec:ecscratch[nl5]:path/file ec:ecfs[nl5]:path/file ec:ectmp[nl5]:path/file # # ftp server # ftp:ftp.somewhere.int:path/file
-v, --verbose : display info on progress