4

Browsing an NTFS partition in Konqueror or Dolphin, the compressed files and folders are not displayed with blue names, and there doesn't seem to be any page in the file properties dialog to see or set the NTFS file attributes. ls -al is also not telling me anything. What can I do to see and set the compression attribute?

4

3 Answers 3

1

Seems like some low level programming will be needed to achieve this.

The flags/bits you are looking for are stored in $BMP and/or $MFT areas of the NTFS partition.

References:

https://en.wikipedia.org/wiki/NTFS#Master_File_Table

http://www.ntfs.com/ntfs-compressed.htm

http://ntfs.com/damaged-file-system-bmp.htm

https://epicentras.wordpress.com/2015/03/02/how-ntfs-works-mysterious-mft-table/

https://flatcap.org/linux-ntfs/ntfs/files/bitmap.html

If you can get/set those bits from another program (say ls) then Konqueror/Dolphin are missing it, otherwise those bits access are not provided by the NTFS handler/mount.

If this is not the answer you are looking for then your question should be flagged as "too generic".

1
  • This is a hint about where the OP could start looking for a solution, but it doesn't come close to being a solution. As such, it's more of a comment than an answer.
    – fixer1234
    Sep 23, 2018 at 7:51
1

Assuming you're using the ntfs-3g driver, my understanding is that the compression attribute can only be set on directories. This can be done by setting the compression flag in the ntfs attributes (see this documentation for details).

To turn on compression for a directory (note you may want to combine the flag with already existing enabled flags):

setfattr -h -v 0x00000800 -n system.ntfs_attrib_be directory-name

To determine if a file is compressed or a directory has compression enabled, read the attributes and check the flag:

getfattr -e hex -n system.ntfs_attrib_be directory/file
# check that returned value has 0x0800 bit set or not

The only way (using filesystem APIs) to have the compression bit turned on for a file is to rewrite the file after setting the compression bit on the directory containing the file.

0

I have found no way to customize the display of Konqueror or Dolphin in this way.

The Nautilus file manager, under GNOME, can be customized using a Nautilus Extension, but this requires programming and is not an easy route to follow.

You may find another file manager among the many that exist on Linux. For example, the following article list a whopping of 22 file managers :
22 Best Linux file managers as of 2018.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .