Originally published at: https://www.cyberciti.biz/faq/remove-hidden-files-in-linux/
I am a new Linux sysadmin and Ubuntu Linux user. How can I remove hidden files in Linux? How do I delete hidden files in Linux starting with . (dot) character?
An interesting footnote is that some files may have problematic names like files starting with a β-β (minus symbol) and one can use βββ as take everything from here as argument like this (from the manpages)
To remove a file whose name starts with a '-', for example '-foo', use one of these commands:
rm -- -foo
rm ./-foo
Itβs more common than one expect in daily sysadmin live to deal with these
1 Like