Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

so I accidentally ran 'sudo rm -f *' within my home directory. Should I worry about it? I did I delete hidden files? can I get it back? or did I just deleted empty folders(pictures, music,etc)?

edit: this is a fairly new install, so i didnt have any pictures, songs, etc. Also, it is a ext2 partition

share|improve this question

2 Answers 2

up vote 2 down vote accepted

rm -f * would not have deleted your hidden files, meaning your settings for the most part should be safe. You can verify by:

ls -a ~/

Is this a new install, or did you have files that you need restored? If you did lose some photos, music, etc. here is a link to some more information on recovery: How to recover deleted files?

share|improve this answer
    
Right... Sorry, I forgot about hidden files remaining. Your application settings should be fine. –  hexafraction May 24 '12 at 20:27
    
yup its all there –  alme1304 May 24 '12 at 20:39
1  
rm -rf * does not delete hidden files located directed in the directory from which it is run. It does delete hidden files in non-hidden subdirectories, since those entire directories are deleted (with all their files). In effect this means that if you run it in your home directory, then configuration files that start with ., application configuration directories that start with ., and the .config directory are all spared--none are deleted. But if there are hidden files (starting with .) inside non-hidden directories inside the home directory, those will be deleted. –  Eliah Kagan May 24 '12 at 20:41
1  
Although true, the OP's command was rm -f *, so unless that was a typo, it would not delete folders anyway. ;-) –  reverendj1 May 24 '12 at 20:49

You will lose all use settings and browser profiles, as well as any downloads or files you specifically saved there. Next time you login, and use programs that lost their configuration files, they will create new ones, albeit with the default settings.

In a nutshell: You would only be worried about files you deliberately put in your home directory and application settings.

share|improve this answer
1  
This answer helpfully mentions that configuration files are usually created when you start up the applications that use them. –  John S Gruber May 25 '12 at 3:08
    
@JohnSGruber Thanks for the feedback! –  hexafraction May 25 '12 at 20:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.