I'm using the GnuWin32 libraries on a Windows 7 machine. I do not like that the ls command shows NTFS hidden files. I've found two methods to hide these files.

One solution is to mount the partition using the hide_hid_files mount option in linux, which is not useful for me because I'm using Windows.

The other solution involves using .hidden files, which would be burdensome to manually maintain.

It should be possible to write a script that creates these files on the fly and then call ls afterward. Should I write the script I described or is there a better way to achieve the desired output? Does anyone have a script for this situation already made?

  • if you perform "ls -la" on these files is there anything that makes them stand out? wondering if you could create an alias for ls with a grep... – mikejonesey Oct 25 '16 at 22:18
  • No, ls doesn't list NTFS attributes at all. – krowe2 Oct 25 '16 at 22:20
  • what is the output of mount? wondering if you can do a cheeky remount even though you are using gnuwin32 and didn't mount... – mikejonesey Oct 25 '16 at 22:26
  • mount is not part of GnuWin32 or Windows. – krowe2 Oct 26 '16 at 14:05
  • 3
    I'm voting to close this question as off-topic because it's more about Windows than Unix or Linux — even though it's about using GNU tools, the specifics relate to NTFS. – Stephen Kitt Nov 26 '16 at 9:37

Browse other questions tagged or ask your own question.