Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a MS Based system (Windows, any versions) You can use the attrib command in order to change the attributes on a specified file, directory or directory with recursively changing the files inside the directory also, the command may look like:

attrib FOLDERNAME -s -r -a -h /S /D

Which will remove any attributes to a specified FOLDERNAME including the files/folders inside of it.

When a Virus modifies these attributes to the files/folders in a removable device (USB/SD Memory/HDD) in order to hidden them from the user, I use my Ubuntu OS Based computer and plug the device in the appropriate slot and I can see all the files/folders and manually remove the undesired items on the device. But I am in need to run to a MS OS Based computer/laptop in order to change the attributes via command line (cmd) and this way, "bring back" the items visible to the rest of the people.

Ubuntu is having the ability to change the file properties via GUI or chmod, but I haven't found a way yet to remove the hidden (attrib -h) attribute in a file/folder.

Is it there a way to do this? No matters if is a GUI or Terminal

share|improve this question
So you want to remove the hidden permissions on Windows files from Ubuntu? (thing is hidden files in Ubuntu begin with a . ;) ) – Rinzwind Sep 14 '11 at 17:37
@Rinzwind: yes, I couldn't say it better. But my problem is that Windows machines won't see hidden files that can be seen in Ubuntu without a hassle. Thank you. – Geppettvs D'Constanzo Sep 14 '11 at 17:42
ntfs? fat? .... – Rinzwind Sep 14 '11 at 17:46
MS Based systems seems not to have problems about the File System itself. Any information will be appreciated as an answer but thanks for asking. I have both NTFS and FAT File Systems on different devices, suffering of the same issue constantly. – Geppettvs D'Constanzo Sep 14 '11 at 17:49
ok half an answer for now: fat. I can not find anything related to NTFS yet.edit: I do not think you can do ntfs... hope I am proven wrong by someone else ;) – Rinzwind Sep 14 '11 at 17:54
up vote 8 down vote accepted

Have a look at fatattr Install fatattr if the disc is vfat.

FAT filesystems contain several attributes which do not map cleanly onto Unix attributes; this utility allow these to be controlled directly by unprivileged users on any mounted FAT partition.

Syntax is

fatattr [+-hsra] [files]

The letters are...

h hidden
s system
r read only
a archive
share|improve this answer
Absolutely perfect! This is working like a charm on FAT FS. I really appreciate a lot your help. Now let's expect somebody comes soon to drop us a NTFS solution, meanwhile, your answer is for me which solved my problem for FAT's. Thank you very much! – Geppettvs D'Constanzo Sep 14 '11 at 22:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.