Is it possible to prevent creation of .directory files?

6

1

I'm on OpenSuse 12.3 and I wonder if there's a way to prevent creation of .directory files (preferably under some specific directory)

The question arose for the need of a "clean" directory. I'm compiling something and the source directory must be completely original, there shouldn't be any additional files. But the filesystem (or dolphin) creates it and the compile fails.

Is it possible to prevent it?

PS. The compiler I'm using doesn't have an option to exclude specific files during operation so I just have to get rid of .directory files, at least in my working directory.

Gökhan Öz

Posted 2013-03-21T18:29:51.790

Reputation: 59

What directory is created? When is it created? – terdon – 2013-03-21T18:41:14.233

Answers

5

Dolphin uses those files to remember the view properties of each folder. You can easily get rid of them by choosing common view properties for all folders in Dolphin preference under general tab. But, obviously, there won't be specific properties for specific directories anymore.

mockingjay

Posted 2013-03-21T18:29:51.790

Reputation: 51

1I suppose making a sqlite db to store an (inode-id, settings)-tuple in some dolphin-directory would have been too much trouble... – Quandary – 2019-05-05T09:07:52.920

1

As far as I have experienced, you can not prevent specific .directory-files from being created - unless you tweak some options for your entire KDE-profile. .directory-files store options specific to each folder. If you make dolphin use the same view-settings for all folders, you can prevent a lot of those files from being created in the first place. I also suggest turning off all sorts of previews for files within dolphin.

If the compiler can handle empty files, what about just creating an empty .directory-file and revoking write-privileges? touch .directory; chmod 444 .directory

s-m-e

Posted 2013-03-21T18:29:51.790

Reputation: 351