Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Hide hidden NTFS files and folders

  1. #1
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Hide hidden NTFS files and folders

    Hello,

    Is there a way to have the NTFS partition mounted without showing the hidden ntfs files and folders under Ubuntu?

    I found this page and it seems to be possible.

    Thank you.

    Yoram
    Yoram David
    __________________________________________
    We must be the change we want for the world (Ghandi)

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Hide hidden NTFS files and folders

    Quote Originally Posted by yoramdavid View Post
    Hello,

    Is there a way to have the NTFS partition mounted without showing the hidden ntfs files and folders under Ubuntu?

    I found this page and it seems to be possible.

    Thank you.

    Yoram
    You put the relevant options in the appropriate place in the /etc/fstab file.

    Use the pysdm package or do a search on mounting drives for detailed info.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  3. #3
    Join Date
    May 2007
    Location
    Virginia, USA
    Beans
    13,377
    Distro
    Ubuntu Mate Development Release

    Re: Hide hidden NTFS files and folders

    IF you read the details in that link closely, you'll see that the only files that are really "hidden" are the ones with dots preceding their filenames -- a convention that Windows filesystems do NOT use.

    So basically, those settings accomplish little useful.

    If you're concerned about folks (or you) accidentally damaging system files, a better solution is to mount read-only. That way, none of the files or directories can be damages.
    Ubuntu 20.04, Mint 19.10; MS Win10 Pro.
    Will not respond to PM requests for support -- use the forums.

  4. #4
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Hide hidden NTFS files and folders

    @yoramdavid, there are two types of hidden files. The Linux ones with the leading dot and the Windows system using the NTFS attribute with hidden flag. According to the link you posted there are mount options for both. My guess is that you want to hide the NTFS folders "System Volume Information" and "$RECYCLE.BIN". The option hide_hid_files works for this, and this is the appropriate /etc/fstab line from one of my systems:

    Code:
    UUID=4E74462B225AD5CB /media/Data     ntfs    defaults,uid=1000,umask=000,windows_names,hide_hid_files 0       0
    That effectively hides those two system folders.

    Although you don't ask this, you might want to use the windows_names option as well. You can read up on this in your link but briefly without it, Linux is able to save files to NTFS with so-called forbidden characters such as : in the filename which Windows doesn't support. Rather bizarrely, you can see and use these files in Ubuntu/Linux even on a NTFS filesystem, but if you try in Windows you get an error.

    If you want help with editing your /etc/fstab, just post back.
    Ubuntu 20.04 Desktop Guide - Ubuntu 22.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

  5. #5
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Hide hidden NTFS files and folders

    Quote Originally Posted by dcstar View Post
    You put the relevant options in the appropriate place in the /etc/fstab file.

    Use the pysdm package or do a search on mounting drives for detailed info.
    Thank you for your help,

    I installed pysdm but I nee to read more about how to use it and since my Internet has been down, I had not had the chance yet. Ie, I do not know where to put the option "hide_hid_files" option.

    Yoram
    Yoram David
    __________________________________________
    We must be the change we want for the world (Ghandi)

  6. #6
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Hide hidden NTFS files and folders

    Quote Originally Posted by coffeecat View Post
    @yoramdavid, there are two types of hidden files. The Linux ones with the leading dot and the Windows system using the NTFS attribute with hidden flag. According to the link you posted there are mount options for both. My guess is that you want to hide the NTFS folders "System Volume Information" and "$RECYCLE.BIN". The option hide_hid_files works for this, and this is the appropriate /etc/fstab line from one of my systems:

    Code:
    UUID=4E74462B225AD5CB /media/Data     ntfs    defaults,uid=1000,umask=000,windows_names,hide_hid_files 0       0
    That effectively hides those two system folders.

    Although you don't ask this, you might want to use the windows_names option as well. You can read up on this in your link but briefly without it, Linux is able to save files to NTFS with so-called forbidden characters such as : in the filename which Windows doesn't support. Rather bizarrely, you can see and use these files in Ubuntu/Linux even on a NTFS filesystem, but if you try in Windows you get an error.

    If you want help with editing your /etc/fstab, just post back.
    Thank you for your help, so I followed what you advised me and it works indeed with those files, is there any way to also hide non-system files and folders which have the hide flag under windows?

    Thank you.

    Yoram
    Yoram David
    __________________________________________
    We must be the change we want for the world (Ghandi)

  7. #7
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Hide hidden NTFS files and folders

    Quote Originally Posted by yoramdavid View Post
    Thank you for your help, so I followed what you advised me and it works indeed with those files, is there any way to also hide non-system files and folders which have the hide flag under windows?

    Thank you.

    Yoram
    Does it not hide them? I only checked with those two system folders and assumed that it would hide anything in a NTFS filesystem with the hidden flag set. From your link:

    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”.
    Ubuntu 20.04 Desktop Guide - Ubuntu 22.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

  8. #8
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Hide hidden NTFS files and folders

    Quote Originally Posted by coffeecat View Post
    Does it not hide them? I only checked with those two system folders and assumed that it would hide anything in a NTFS filesystem with the hidden flag set. From your link:
    Yes it did!
    I am sorry, I checked a partition where I have a hidden folder under windows and it was there.
    After your comment I went back and checked another partition and indeed they do not show up.
    Sorry for the mis-information and thank you very much.

    I read that I can add an option "noauto" so that the partition is not mounted automatically but I can add the same options as before for when I mount it.
    Looks like this:
    HTML Code:
    #Entry for /dev/sda1 :
    UUID=B6C4C919C4C8DD2D	/media/Windows_XP	ntfs	defaults,nls=utf8,umask=0222,noauto,user,ro,windows_names,hide_hid_files	0	0
    I have not rebooted yet to test it, I wanted to reply first to your message.

    Yoram
    Yoram David
    __________________________________________
    We must be the change we want for the world (Ghandi)

  9. #9
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Hide hidden NTFS files and folders

    I had to remove the "defaults" bit at the beginning, then it worked.
    Thank you again for the help.

    Problem solved, threat closed.
    (many other still opened...

    Yoram
    Yoram David
    __________________________________________
    We must be the change we want for the world (Ghandi)

  10. #10
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Hide hidden NTFS files and folders

    Quote Originally Posted by coffeecat View Post
    @yoramdavid, there are two types of hidden files. The Linux ones with the leading dot and the Windows system using the NTFS attribute with hidden flag. According to the link you posted there are mount options for both. My guess is that you want to hide the NTFS folders "System Volume Information" and "$RECYCLE.BIN". The option hide_hid_files works for this, and this is the appropriate /etc/fstab line from one of my systems:

    Code:
    UUID=4E74462B225AD5CB /media/Data     ntfs    defaults,uid=1000,umask=000,windows_names,hide_hid_files 0       0
    That effectively hides those two system folders.

    Although you don't ask this, you might want to use the windows_names option as well. You can read up on this in your link but briefly without it, Linux is able to save files to NTFS with so-called forbidden characters such as : in the filename which Windows doesn't support. Rather bizarrely, you can see and use these files in Ubuntu/Linux even on a NTFS filesystem, but if you try in Windows you get an error.

    If you want help with editing your /etc/fstab, just post back.
    Hmmm, can I do the same for an external hdd?
    I tried and get an error that only root can boot the device. Even with "user" in options.
    Yoram David
    __________________________________________
    We must be the change we want for the world (Ghandi)

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •