I tried using rm -rf .*
command to remove a hidden file and I am met with this error.
rm: refusing to remove '.' or '..' directory: skipping '.'
rm: refusing to remove '.' or '..' directory: skipping '..'
I tried using rm -rf .*
command to remove a hidden file and I am met with this error.
rm: refusing to remove '.' or '..' directory: skipping '.'
rm: refusing to remove '.' or '..' directory: skipping '..'
ls -A
in the directory holding the file you want to delete, what is the name of the file? Running yourrm -rf .*
will have deleted ALL files and directories starting with a dot (.
). If that was in your home directory you'll have now lost all your configuration files. Time to restore from your backup - if you had one – Chris Davies Jan 18 '24 at 14:27rm -rf .*
does not remove "a hidden file" but all of them in your current working directory. And hidden directories, if any, recursively. Are you sure you want this? It's a pretty dangerous command that I don't recommend to ever execute. Remove only the exact files and directories you want to. Also maybe consider using an interactive file manager, such asmc
in terminals, or a graphical one. – egmont Jan 18 '24 at 20:02