AnsweredAssumed Answered

How to delete a folder which has contents through HNAS CLI

Question asked by Sudeesh Varier on Apr 27, 2016
Latest reply on Nov 29, 2016 by B316V6DY

How to delete a folder which has contents through HNAS CLI. We have a folder under a CIFS share which has some files and folders. We need to clean up the root folder itself to test other things. The command rejects

SEHNAS03[EVS03]:$ ls
ICCData
SEHNAS03[EVS03]:$ rm -f /data
SEHNAS03[EVS03]:$ rm -f /Data
SEHNAS03[EVS03]:$ rm -fr /Data
Bad switch "-fr". If the file name begins with a dash, specify it after a stand-alone option "--"
Syntax: rm [-f|--force] [-v|--verbose] [--] <file1> [<file2>...]
SEHNAS03[EVS03]:$ ls
Data
SEHNAS03[EVS03]:$ rm -rf Data
Bad switch "-rf". If the file name begins with a dash, specify it after a stand-alone option "--"
Syntax: rm [-f|--force] [-v|--verbose] [--] <file1> [<file2>...]
SEHNAS03[EVS03]:$ rm -f Data
rm: cannot remove 'Data': FileIsDirectory

Outcomes