How to empty a directory in SSH

TicketĀ  AGD-386976

Request: empty folder “\\\\temp”

Solution:

To delete then recreate the folder:

1)login to server

2)”cd” to folder containing the folder you want emptied:

root@cat [/home/junebug]# cd public_html

3)rm -rf directory:

root@cat [/home/junebug/public_html]# rm -rf \\\\temp

4)recreate the directory

root@cat [/home/junebug/public_html]# mkdir \\\\temp

*Folder will not retain the same permissions, set them to what they were originally after creating the directory. I do not know how to check the permissions before removing the folder.

Leave a Reply