8

I am running dual boot (Ubuntu 16.10 and Windows 10). When I boot into Ubuntu, I always see the 2 folders $RECYCLE.BIN and System Volume Information. Besides, in one drive I see a file named pagefile.sys. I delete them all, but every time I boot into Ubuntu, they appear again.

Can anyone show me how to permanently delete them, or at least hide them because I find them annoying. Thanks

Garp
  • 617
  • 2
  • 8
  • 7
  • 3
    Those are Windows system files, not a good idea to delete them. – mikewhatever Oct 22 '16 at 06:11
  • I deleted them, then booted into Windows. Everything works normally. Then I booted into Ubuntu, they appeared again. Can you suggest any solutions, just to hide them in Ubuntu because I don't want to see them. – Garp Oct 22 '16 at 06:14
  • An immediate solution would be not to share partitions with Windows. I am not quite sure it's worth the trouble, but that's for you to decide. – mikewhatever Oct 22 '16 at 06:17
  • Thank you. But I have to switch back and forth between the 2 operating systems from time to time, so I need the common storage that both OS can access. Hope someone can invent something just to hide these annoying stuff. – Garp Oct 22 '16 at 06:22
  • ...or may be you'll just get used to it. :~) How bad can it really be? – mikewhatever Oct 22 '16 at 06:23
  • yeah, I think I'll have to learn to live with them for a while :) – Garp Oct 22 '16 at 06:29
  • You should be able to get rid of `pagefile.sys`. I am dual-booting with an old Windows XP and in XP I managed to create a separate partition for the page-file and only this partition will be used for the page-file. How to do that in Windows 10 I am over-asked, you could place a question about this at [superuser](http://superuser.com/). – mook765 Oct 22 '16 at 11:29

2 Answers2

13

Create a text file .hidden on your hard drive, and add folders you wish to hide, like this:

found.000
$RECYCLE.BIN
RECYCLER
System Volume Information
pagefile.sys
David Foerster
  • 35,754
  • 55
  • 92
  • 145
Russell
  • 131
  • 4
2

The NTFS-3G file system driver has mount options that let you show/hide files with the "system" or "hidden" file attributes. Windows uses these flags to hide files in its file manager by default. The mount options are

  • show_sys_files (the default is to hide them) and
  • hide_hid_files (the default is to show them)

respectively.

The NTFS-3G manual says about them:

show_sys_files – Show the metafiles in directory listings. Otherwise the default behaviour is to hide the metafiles, which are special files used to store the NTFS structure. Please note that even when this option is specified, $MFT may not be visible due to a glibc bug. Furthermore, irrespectively of show_sys_files, all files are accessible by name, for example you can always do ls -l '$UpCase'.

hide_hid_files – Hide the hidden files and directories in directory listings, the hidden files and directories being the ones whose NTFS attribute have the hidden flag set. The hidden files will not be selected when using wildcards in commands, but all files and directories remain accessible by full name, for example you can always display the Windows trash bin directory by: ls -ld '$RECYCLE.BIN'.

David Foerster
  • 35,754
  • 55
  • 92
  • 145