Removing Files via SSH

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….


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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Removing Files via SSH." foobartel.com :: Stream | Sciencx - Saturday April 21, 2012, https://www.scien.cx/2012/04/21/removing-files-via-ssh/
HARVARD
foobartel.com :: Stream | Sciencx Saturday April 21, 2012 » Removing Files via SSH., viewed ,<https://www.scien.cx/2012/04/21/removing-files-via-ssh/>
VANCOUVER
foobartel.com :: Stream | Sciencx - » Removing Files via SSH. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2012/04/21/removing-files-via-ssh/
CHICAGO
" » Removing Files via SSH." foobartel.com :: Stream | Sciencx - Accessed . https://www.scien.cx/2012/04/21/removing-files-via-ssh/
IEEE
" » Removing Files via SSH." foobartel.com :: Stream | Sciencx [Online]. Available: https://www.scien.cx/2012/04/21/removing-files-via-ssh/. [Accessed: ]
rf:citation
» Removing Files via SSH | foobartel.com :: Stream | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.