2

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

alme1304
  • 243

2 Answers2

2

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?

reverendj1
  • 16,045
  • Right... Sorry, I forgot about hidden files remaining. Your application settings should be fine. – nanofarad 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
1

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.

nanofarad
  • 20,717
  • 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 03:08