Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Show Hidden Files and Folders on a USB Drive

· 6 min read · Home Tech

In this article
  1. Why Files Become Hidden on a USB Drive
  2. How Hidden Files Work in Different File Systems
  3. How to Show Hidden Files on Windows
  4. How to Show Hidden Files on macOS
  5. How to Show Hidden Files on Linux
  6. Common Problems and Solutions
  7. Safety and Security Considerations
  8. Alternatives to Manual Unhiding
  9. Frequently Asked Questions

To show hidden files and folders on a USB drive, you need to enable the "Show hidden files, folders, and drives" option in your operating system's file manager settings, or use a command-line tool to reveal them. This process varies slightly between Windows, macOS, and Linux, but the core idea is the same: hidden files are not deleted, just marked with a hidden attribute that most file managers ignore by default.

Why Files Become Hidden on a USB Drive

Files and folders on a USB drive can become hidden for several reasons. The most common is the hidden attribute set by the file system itself—on Windows, this is the H attribute in NTFS or FAT32. Malware often hides files as a defense mechanism, making it look like your drive is empty when it actually contains data. Another cause is copying files from a system that uses hidden folders for system files (like Windows' System Volume Information or macOS's .fseventsd). Sometimes users accidentally hide files, or a program sets the attribute during installation. Understanding why files are hidden helps you decide whether to simply unhide them or also scan for threats.

How Hidden Files Work in Different File Systems

Hidden files are not a separate type of file—they are regular files with a special flag. On Windows (NTFS and FAT32), the hidden attribute is stored in the file's metadata. On macOS and Linux, hidden files are typically those whose names begin with a dot (e.g., .hidden). The file system does not treat them differently; it's the file manager that decides whether to display them. This is why a file hidden on Windows may appear normally on macOS, because macOS does not read the Windows hidden attribute—it only looks for dot-prefixed names. Conversely, a dotfile created on macOS will show up in Windows Explorer as a normal file (since Windows doesn't hide dotfiles by default). This cross-platform inconsistency often confuses users who switch between operating systems.

How to Show Hidden Files on Windows

Windows offers two primary methods: File Explorer options and Command Prompt.

  • File Explorer (GUI): Open File Explorer, click the View tab, then check the box labeled Hidden items in the Show/hide group. This instantly reveals hidden files and folders on the selected drive. For a more permanent change, go to File > Change folder and search options > View tab, and under Advanced settings, select Show hidden files, folders, and drives. Click OK.
  • Command Prompt: Open Command Prompt (cmd) and navigate to the USB drive (e.g., E:). Use the command attrib -h -s /s /d *.* to remove the hidden and system attributes from all files and folders in the current directory and all subdirectories. The -h removes hidden, -s removes system, /s applies to subfolders, and /d applies to folders. This is especially useful if the files are also marked as system files, which the GUI option may not fully reveal.

How to Show Hidden Files on macOS

On macOS, hidden files are usually dotfiles. To reveal them in Finder:

  1. Open a Terminal window (Finder > Applications > Utilities > Terminal).
  2. Type the command defaults write com.apple.finder AppleShowAllFiles YES and press Enter.
  3. Then type killall Finder and press Enter to restart Finder. Hidden files will now appear as semi-transparent icons.
  4. To revert, change YES to NO and repeat the killall Finder command.

Alternatively, you can press Command + Shift + . (period) inside any Finder window to toggle hidden files on and off temporarily—this works in macOS Sierra and later. This shortcut is quick and doesn't require Terminal.

How to Show Hidden Files on Linux

Most Linux file managers (like Nautilus, Dolphin, or Thunar) hide dotfiles by default. To show them:

  • In most file managers, press Ctrl + H to toggle hidden files on and off. This works in Nautilus (GNOME), Dolphin (KDE), and Thunar (XFCE).
  • In the terminal, use ls -a to list all files including hidden ones. To view hidden files in a graphical file manager, you can also go to the View menu and select Show Hidden Files.

If the files are hidden due to a Windows-style attribute (not a dotfile), you may need to use the dosfsck tool or mount the drive with the showhidden option, but this is rare. For most cases, Ctrl+H suffices.

Common Problems and Solutions

Sometimes hidden files remain invisible even after you enable the option. Here are common issues:

  • System files: On Windows, files marked as system are not shown even when "Hidden items" is checked. You must uncheck Hide protected operating system files in Folder Options, or use the attrib -s command.
  • Malware: If your USB drive has been infected, malware may hide files and create shortcuts. After unhiding, run a full antivirus scan. Do not double-click suspicious shortcuts.
  • File system errors: If the drive is corrupted, hidden files may not display correctly. Run chkdsk E: /f on Windows or fsck on Linux to repair errors.
  • Drive letter not assigned: If the USB drive doesn't appear at all, check Disk Management (Windows) or Disk Utility (macOS) to ensure it has a drive letter and is mounted.

Safety and Security Considerations

When you unhide files, be cautious. Hidden files are often system files that are essential for the drive's operation—deleting them can make the drive unbootable or unreadable. Never delete files you don't recognize, especially in the root directory. If you suspect malware, scan the drive with antivirus software before opening any files. Also, be aware that some hidden files contain sensitive data (like browser profiles or encryption keys) that you might not want to expose. After you've recovered your files, consider re-hiding them to keep the drive tidy, or better yet, back up the data and format the drive to remove any potential malware.

Alternatives to Manual Unhiding

If you're not comfortable with command-line tools, there are free utilities that can unhide files with a click. For example, on Windows, you can use the built-in attrib command via a batch file, or use a third-party tool like Unhide (a free utility from Bleeping Computer) that automates the process. On macOS, the defaults command is the standard, but you can also use the chflags nohidden command on specific files. On Linux, the mv command can rename a dotfile to remove the dot, making it visible. These alternatives are useful when you need to unhide many files quickly or when the GUI method fails.

Frequently Asked Questions

Why are my files hidden on the USB drive? Files can be hidden due to the hidden attribute set by the file system, malware, or because they are system files. On macOS and Linux, dotfiles are hidden by default. It's not a sign of data loss—the files are still there.

How do I recover hidden files from a USB drive without software? You can use the built-in methods described above: on Windows, use attrib -h -s /s /d *.* in Command Prompt; on macOS, use defaults write com.apple.finder AppleShowAllFiles YES; on Linux, press Ctrl+H in the file manager. These require no additional software.

Can hidden files be a virus? Hidden files themselves are not viruses, but malware often hides its files to avoid detection. If you find hidden files you didn't create, scan the drive with antivirus software before opening them.

Why can't I see hidden files even after enabling the option? On Windows, you may also need to uncheck "Hide protected operating system files" in Folder Options. On macOS, the defaults command may not work if you have restricted Finder—try the Command+Shift+. shortcut instead. On Linux, some file managers require a restart after pressing Ctrl+H.

Will unhiding files damage my USB drive? No, unhiding files only changes the visibility attribute; it does not modify the file data. However, deleting hidden system files can damage the drive, so only delete files you are sure are safe.

How do I hide files again after viewing them? On Windows, uncheck "Hidden items" in the View tab or use attrib +h on selected files. On macOS, use defaults write com.apple.finder AppleShowAllFiles NO and restart Finder. On Linux, press Ctrl+H again.