Can somebody please help to Delete Linux directories recursively.
I am trying to delete contents of a directory which has both files and sub-directories
wait/run rm -rf /path/to/directory/* is not working
Can somebody please help to Delete Linux directories recursively.
I am trying to delete contents of a directory which has both files and sub-directories
wait/run rm -rf /path/to/directory/* is not working
How about
wait /bin/sh -c 'rm -rf /path/to/directory'
I think folder delete
action script command does that.
Please refer to: https://developer.bigfix.com/action-script/reference/file/folder-delete.html
As @akira mentioned the best way is folder delete but if you use the shell remember the path can’t have spaces unless it is quoted or escaped
I always do this one when I am outside of bigfix…
rm -fdrv /path/to\ directory\ with\ spaces/in/name
Chris
Something to think about w/ bigfix: recursivity is handled by relevance and task building options (in a very novel way I might add). So build the basic task, but then in your deployment window, tell bf to keep retrying until no longer relevant. Make sense?
To remove the folder with all its contents(including all interior folders):
rm -rf /path/to/directory
To remove all the contents of the folder(including all interior folders) but not the folder itself:
rm -rf /path/to/directory/* orrm -rf /path/to/directory/{,.}
if you want to make sure that hidden files/directories are also removed.
rm -f /path/to/directory/{,.}
rm /path/to/directory/filename
hope this will help you
Thaank You