This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream
I needed to delete a lot of files from a web server and it was taking forever. To get this done faster, I looked into removing the files via SSH. The following handy lines of code let you find or delete all files and folders within a certain directory.
To find all files and folders at least one level deep in the specified directory, type:
find <name-of-directory or path> -mindepth 1
To delete all files and folders inside the specified directory, type this:
find <name-of-directory or path> -mindepth 1 -delete
As always, use this command with caution.
This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream

foobartel.com :: Stream | Sciencx (2012-04-21T22:00:00+00:00) Removing Files via SSH. Retrieved from https://www.scien.cx/2012/04/21/removing-files-via-ssh/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.