Portal Home > Knowledgebase > Articles Database > How to delete backup files?


How to delete backup files?




Posted by grandad, 10-25-2009, 12:58 PM
I have files on offsite backup from a previous server - I can login via putty ot winscp. Putty login shows: i want to delete them all - how can I do this in the most secure manner with the access I have? TIA

Posted by eth00, 10-25-2009, 01:03 PM
That notice is just the servers motd. You can rm -rf the backup directory, it sounds like you just have a shell account on there.

Posted by grandad, 10-25-2009, 01:18 PM
I tried just rm -rf at the $ - didn't delete anything. Then tried cd cpbackup and rm -rf - didn't delete anything. What am I doing wrong?

Posted by eth00, 10-25-2009, 01:20 PM
Did it just hang? If you are deleting a lot of files it will sit there for awhile while it deletes. It is not an instant thing.

Posted by grandad, 10-25-2009, 01:24 PM
Ran the rm -rf and after a few seconds I got the '$' again. I assumed that the '$' would only appear after the process had completed. Not a single file has been deleted.

Posted by e-Sensibility, 10-25-2009, 01:25 PM
If you're getting a money symbol ($) prompt instead of a hash (#) prompt then you're probably not root. do "su" then "rm -rf yourfoldername" By the way, you should upgrade your freebsd version to 6.4 at least. 6.1 was EOL'd a while back (meaning that security updates for it are no longer released).

Posted by grandad, 10-25-2009, 01:29 PM
Just get "Sorry". (Not my backup server, just rented space so updates are the responsibility of the provider).

Posted by grandad, 10-25-2009, 01:36 PM
Spoke too soon - it's worked, obviously I just didn't wait long enough and assumed it wasn't working - thanks for your help.

Posted by e-Sensibility, 10-25-2009, 01:45 PM
do "echo $USER" go to the parent directory of the folder you want to delete. Do "ls -l | grep yourfoldername" Look at the output to determine whether that folder is owned by you. If it is you shouldn't even have to su. If it isn't owned by you then that's why you can't delete it. And the reason "su" didn't work is because your user is not a member of the group "wheel." If it is owned by you and you still can't delete it I'd check to make sure that you typed in the folder name correctly as it should be working. Also, it's pretty negligent of your provider to keep that server out of date

Posted by e-Sensibility, 10-25-2009, 01:47 PM
Glad to hear you got it figured out. Ignore my last post



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read