Rmdir
(since EVL 2.6)
Remove <directory>
on local filesystem or on HDFS in case <directory>
starts with
‘hdfs://’ or on remote machine by ‘ssh’ when starts with ‘sftp://’. It fails if the
directories are empty.
Each <directory>
is of the form
[<scheme>://][[<user>@@]<host>[:<port>]]<path> ...
For scheme ‘hdfs://’ it calls function ‘evl_hdfs_rmdir’, which is by default ‘hdfs dfs -rmdir’.
For scheme ‘sftp://’ it calls function ‘evl_sftp_rmdir’.
Synopsis
Rmdir [-p|--parents] <directory>... evl rmdir [-p|--parents] <directory>... evl rmdir ( --help | --usage | --version )
Options
- -p, --parents
-
remove
<directory>
and its ancestors, e.g. ’Rmdir -p a/b/c’ is similar to ’Rmdir a/b/c a/b a’
Standard options:
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- --version
-
print version and exit
Examples
- Simple usage examples:
Rmdir hdfs:///some/path/ Rmdir /some/local/machine/path/
- Depends on environment, e.g. ‘PROD’/‘TEST’/‘DEV’, might be useful to be used this
way:
# on DEV: OUTPUT_DIR=/data/output # on PROD: OUTPUT_DIR=hdfs:///data/output
and then use in ‘evs’ file:
Rmdir -p "$OUTPUT_DIR"
and do not care if you operate locally or on HDFS.