Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
reference.md 34.11 KiB

Command Reference

cp

Options for this command are client-specific. Refer to the relevant client usage as shown below.

=== "Usage: jalien" ```console

usage: cp   [-options] <source> [<target>]
Source and target paths can be one of the following formats:
	file://<local file on disk>
	alien://<path in the Grid catalogue>
	or without a prefix, in which case it's treated as a Grid path

options:
                    -g                     :  treat the Grid path as a GUID
                    -S <SEs|QoS:count>     :  Storage target specifications for uploading, default is 'disk:2'
                    -t                     :  no target needed, create a local temporary file instead, print out the local path at the end
                    -silent                :  execute command silently
                    -w                     :  wait for all replicas to complete upload before returning (default false)
                    -W                     :  do _not_ wait for all replicas to complete upload, return as soon as the first replica is available
                    -T                     :  Use this many concurrent download threads (where possible) - default 1
                    -d                     :  delete local file after a successful upload (i.e. move local to Grid)
                    -j <job ID>            :  the job ID that has created the file
                    -m                     :  queue mirror operations to the missing SEs, in case of partial success. Forces '-w'
```

=== "Usage: alien.py" ```console Command format is of the form of (with the strict order of arguments): cp src dst or cp -input input_file where src|dst are local files if prefixed with file:// or file: or grid files otherwise and -input argument is a file with >src dst< pairs after each src,dst can be added comma separated specifiers in the form of: @disk:N,SE1,SE2,!SE3 where disk selects the number of replicas and the following specifiers add (or remove) storage endpoints from the received list %ALIEN alias have the special meaning of AliEn user home directory options are the following : -h : print help -dryrun : just print the src,dst pairs that would have been transfered without actually doing so -f : No longer used flag! md5 verification of already present destination is default; disable with -fastcheck -fastcheck : When already present destination is check for validity, check only size not also md5 -S : uses num additional parallel streams to do the transfer. (max = 15) -chunks : number of chunks that should be requested in parallel -chunksz : chunk size (bytes) -T <nr_copy_jobs> : number of parralel copy jobs from a set (for recursive copy); defaults to 8 for downloads -timeout : the job will fail if did not finish in this nr of seconds -retry : retry N times the copy process if failed -ratethreshold <bytes/s> : fail the job if the speed is lower than specified bytes/s -noxrdzip: circumvent the XRootD mechanism of zip member copy and download the archive and locally extract the intended member. N.B.!!! for recursive copy (all files) the same archive will be downloaded for each member. If there are problems with native XRootD zip mechanism, download only the zip archive and locally extract the contents

For the recursive copy of directories the following options (of the find command) can be used:
-glob <globbing pattern> : this is the usual AliEn globbing format; N.B. this is NOT a REGEX!!! defaults to all "*"
-select <pattern> : select only these files to be copied; N.B. this is a REGEX applied to full path!!!
-name <pattern> : select only these files to be copied; N.B. this is a REGEX applied to a directory or file name!!!
-name <verb>_string : where verb = begin|contain|ends|ext and string is the text selection criteria.
verbs are aditive : -name begin_myf_contain_run1_ends_bla_ext_root
N.B. the text to be filtered cannont have underline <_> within!!!
-parent <parent depth> : in destination use this <parent depth> to add to destination ; defaults to 0
-a : copy also the hidden files .* (for recursive copy)
-j <queue_id> : select only the files created by the job with <queue_id>  (for recursive copy)
-l <count> : copy only <count> nr of files (for recursive copy)
-o <offset> : skip first <offset> files found in the src directory (for recursive copy)

Further filtering of the files can be applied with the following options:
-mindepth/-maxdepth N : restrict results to N directories depth relative to the base/searched for directory.
                        N.B. for in directory globbing (/path1/path2/*.sh : the base directory is /path1/path2)
-minsize/-maxsize N : restrict results to at least/at most N bytes in size
-min-ctime/-max-ctime UNIX_TIME: restrict results to at least/at most this UNIX_TIME (ms, 13 decimals integer)
-user/-group string_name : restrict results to specified user/group
```

=== "Example" console jsh: [alice] > cp file://example.file example.file

quota

Options for this command are client-specific. Refer to the relevant client usage as shown below.

=== "Usage: alien.py" console Client-side implementation that make use of server's jquota and fquota (hidden by this implementation) Command format: quota [user] if [user] is not provided, it will be assumed the current user

cd

=== "Usage" ```console

usage: cd   [dir]   
```

=== "Example" console jsh: [alice] > cd /alice/cern.ch/user/o/odatskov

pwd

No help available for this command

=== "Example" console jsh: [alice] > pwd /alice/cern.ch/user/a/alienci/

mkdir

=== "Usage" ```console

usage: mkdir   [-options] <directory> [<directory>[,<directory>]]

options:
                    -p                     :  create parents as needed
                    -silent                :  execute command silently
```

rmdir

=== "Usage" ```console

usage: rmdir    [<option>] <directory>

options:
                    --ignore-fail-on-non-empty  :    ignore each failure that is solely because a directory is non-empty
                    -p                     :  --parents   Remove DIRECTORY and its ancestors.  E.g., 'rmdir -p a/b/c' is similar to 'rmdir a/b/c a/b a'.
                    -v                     :  --verbose  output a diagnostic for every directory processed
                                           :  --help      display this help and exit
                                           :  --version  output version information and exit
                    -silent                :  execute command silently
```

ls

=== "Usage" ```console

usage: ls   [-options] [<directory>]

options:
                    -l                     :  long format
                    -a                     :  show hidden .* files
                    -F                     :  add trailing / to directory names
                    -b                     :  print in guid format
                    -c                     :  print canonical paths
                    -H                     :  human readable file sizes (1024-based); implies '-l'
```

=== "Example" console jsh: [alice] > ls -lFH example.file -r-------- alienci alienci 40 B Oct 28 12:54 example.file

find

=== "Usage" ```console

usage: find   [flags] <path> <pattern>


options:
                    -a                     :  show hidden .* files
                    -s                     :  no sorting
                    -c                     :  print the number of matching files
                    -x <target LFN>        :  create the indicated XML collection with the results of the find operation. Use '-' for screen output of the XML content.
                    -d                     :  return also the directories
                    -w[h]                  :  long format, optionally human readable file sizes
                    -j <queueid>           :  filter files created by a certain job ID
                    -l <count>             :  limit the number of returned entries to at most the indicated value
                    -o <offset>            :  skip over the first /offset/ results
                    -r                     :  pattern is a regular expression
                    -f                     :  return all LFN data as JSON fields (API flag only)
                    -y                     :  (FOR THE OCDB) return only the biggest version of each file
```

toXml

=== "Usage: jalien" ```console

usage: toXml   [-i] [-x xml_file_name] [-a] [-l list_from] [lfns]

options:
                    -i                     :  ignore missing entries, continue even if some paths are not/no longer available
                    -x                     :  write the XML content directly in this target AliEn file
                    -a                     :  (requires -x) append to the respective collection
                    -l                     :  read the list of LFNs from this file, one path per line
```

=== "Usage: alien.py" ```console usage: toXml [-i] [-x xml_file_name] [-a] [-l list_from] [lfns]

options:
                    -i                     :  ignore missing entries, continue even if some paths are not/no longer available
                    -x                     :  write the XML content directly in this target AliEn file
                    -a                     :  (requires -x) append to the respective collection
                    -l                     :  read the list of LFNs from this file, one path per line
Additionally the client implements these options:
-local: specify that the target lfns are local files
for -x (output file) and -l (file with lfns) the file: and alien: represent the location of file
the inferred defaults are that the target files and the output files are of the same type
```

=== "Example" console jsh: [alice] > toXml example.file <?xml version="1.0"?> <alien> <collection name="tempCollection"> <event name="1"> <file name="example.file" aclId="" broken="0" ctime="2021-10-28 12:54:46" dir="233353357" entryId="306974419" expiretime="" gowner="alienci" guid="0f896750-37ee-11ec-8f15-024246e5e01d" guidtime="" jobid="" lfn="/alice/cern.ch/user/a/alienci/example.file" md5="3f8a7f1fa8fcfe1faeae60b6036de9de" owner="alienci" perm="400" replicated="0" size="40" turl="alien:///alice/cern.ch/user/a/alienci/example.file" type="f" /> </event> <info command="example.file" creator="alienci" date="Mon Feb 06 10:30:34 UTC 2023" timestamp="1675679434044" /> </collection> </alien>

cat

=== "Usage: jalien" ```console

usage: cat   [-options] [<filename>]

options:
                    -o                     :  outputfilename
                    -n                     :  number all output lines
                    -b                     :  number nonblank output lines
                    -E                     :  shows ends - display $ at end of each line number
                    -T                     :  show tabs -display TAB characters as ^I
```