New answers tagged rm
cd into the folder then execute the following command: ls |xargs rm -rf
Be careful with special file names (spaces, quotes) when piping to rm. There is a safe alternative - the -delete option: find /path/to/directory/ -mindepth 1 -mtime +5 -delete That's it, no separate rm call and you don't need to worry about file names. Replace -delete with -depth -print to test this command before you run it (-delete implies -depth).
You're using a remote filesystem. If the server doesn't want you to delete a file, you won't be able to delete the file. The local root user is not necessarily all-powerful on the remote machine. There is presumably an access control list on the Windows machine that causes the file to be read-only or non-deletable through remote accesses.
You can remove directory using following command: sudo rm -r directoryname1/2/3/* It will be delete entire directory after 3/*. Example sudo rm -r Downloads/song/* It will be delete all files which are within Downloads/song.
Probably is in use by a process, solution can be easy: umount the share, check for process using file(use fuser,lsof) and if no process is using remove it
To debug ssh session use "-v" option instead of "-q" and analize the output. Try to use absolute paths in remote command. So this looks like: # ssh -v root@hostname /bin/sh -c '/bin/rm -rf /opt/jetty/'
Top 50 recent answers are included