find /path/to/dir -depth -name ".*" -execdir sh -c 'mv "$0" "$0#./"' {} \; Warning: This will rename every single dot-file in the directory tree. Do not run this in your /home directory or you will break application configurations (like .bashrc ). Sometimes, the standard methods don't work. Here is why. Case 1: The "Virus" Hidden Files Symptoms: You plug in a USB drive. It shows 256MB used, but the folder is "empty." Hidden items are greyed out. You run attrib -r -a -s -h *.* and it works, but the files disappear again the next day.
To permanently unhide a file (rename it to remove the dot): how to unhide files
mv .myhiddenfile myhiddenfile To recursively unhide all files in a directory (advanced script): find /path/to/dir -depth -name "
Open Command Prompt as Admin and use the attrib command to remove System first: Here is why
Estimated reading time: 12 minutes
ls -la (The -a flag stands for "all," which includes dot-files.)
We’ve all been there. You download a project folder, plug in an old USB drive, or help a friend with their laptop, and you notice something is missing. The storage space is occupied, but the files you’re looking for are nowhere to be seen. They haven’t been deleted—they’ve been hidden.
Join our mailing list to receive the latest news and updates from our team.