Re: How to remove all .DS_Store files using Terminal?
- From: Mark Conrad <NoMailAccepted@xxxxxxxxxxx>
- Date: Sat, 15 Apr 2006 06:00:12 GMT
In article <nospam.News.Bob-533D6D.21124314042006@xxxxxxxxxxxxxxxx>,
Bob Harris <nospam.News.Bob@xxxxxxxxxxxxxxxxxxxxxx> wrote:
In my Pismo with OS 10.4.6 there are 25,725 directories (folders), so
that means there are roughly the same number of .DS_Store files, one in
each directory.
My iBook only has 1389 .DS_Store files out of 109239 directories
(1.27 percent)
Most of the directories on the system are System, Library, caches,
etc... where either the Finder does not see, or you as a user do
not navigate to with the Finder. Hence no .DS_Store files
Thanks for straightening me out on that.
This is why these NGs are so great, any mis-conceptions get cleared up
by others who know more about the subject.
By the way, I found out how many .DS_Store files I had by using
locate .DS_Store | wc
Great tip, I will add that to my limited Unix arsenal, thanks.
of course I also have root run the nightly
/usr/libexec/locate.updatedb
job that updates the locate database, but that is a totally
different subject.
Sounds useful, but I thought that OS X had some mechanism that
periodically updated the 'locate' database?
Of course, if the auto' update feature does not work often enough, it
could be a bit useless whenever a 'locate' search was done.
Being the newest Intel based Macs no longer run Classic, it now appears
there is no reason to hang onto those .DS_Store files, so I would not
be surprised to see Apple abandon all those many thousands of .DS_Store
files, one .DS_Store file per directory, in future versions of their OS
- - - and replace them with some centralized method of doing the minor
things that are now being done by thousands of scattered .DS_Store
files.
I disagree. Mac OS 9 (and earlier) never used .DS_Store files, so
they are a MacOSX invention (or maybe a NeXT invention, but
definitely not Classic or Mac OS 9 or earlier).
Hokay, that's what I get for listening to gossip on the net.<g>
Whenever you delete a .DS_Store file, all the above things return to
default values, i.e. the icons jump to default locations in a window,
the window size itself jumps to a default size, and Spotlight
"comments" revert to blank (no comments).
Also, _no_ "new" .DS_Store file gets created, not even if you
restart your Mac.
Not even creating a new file will cause a new .DS_Store file to be
created, provided you do not move any icons in the window, or rezize
the window.
However, _if_ you move any icons, or change the window size, or
"automatically" re-arrange all the icons in the window, _then_ a
.DS_Store file gets created again.
So you just proved my point. There are not 1000's of .DS_Store
files on the file system. Just a thousand or so. Or just over 1%
of the directories contain .DS_Store files.
On my system all the .DS_Store files take up a total of 13MB. I
have more than that tied up in some graphics files or a long .mp3
music file. And since I have a 100GB disk (93 real GB), that is
0.01% of my disk storage). And if you disk is as small as 6GB
then this would be only 0.2%. This is noise and not a major
concern for me or most people.
I found out how much space my .DS_Store files were using via:
sudo find / -name ".DS_Store" -print0 |\
xargs -0 ls -s |\
awk '{size += $1} END{print size}'
Thanks very much for all that info', especially the last part about
finding how much disk space is being used for all the DS files.
I have a book about Terminal scripting on order, hope I can understand
the Unix stuff therein, when it arrives:
Mastering Unix Shell Scripting
by author Randal K. Michael
I find your posting style very refreshing, because most Unix pros here
merely give vague broad hints on Unixy stuff, then expect me to do
_all_ the hard work of digging out the essential details.
You manage to work those details directly into your posts, which has
the benefit of actually showing us non-Unix types that Unix is good for
the practical everyday operation of a Mac.
If you every decide to write a Unix book, let me know so I can be the
first one standing in line for the book.
About deleting .DS_Store files
*********************
But if you want to delete them, have fun.
Naw, as I stated near the start of this thread, my interest in the DS
files is just a matter of curiousity.
.
- Follow-Ups:
- Re: How to remove all .DS_Store files using Terminal?
- From: Bob Harris
- Re: How to remove all .DS_Store files using Terminal?
- References:
- How to remove all .DS_Store files using Terminal?
- From: Mark Conrad
- Re: How to remove all .DS_Store files using Terminal?
- From: Tim Lance
- Re: How to remove all .DS_Store files using Terminal?
- From: Mark Conrad
- Re: How to remove all .DS_Store files using Terminal?
- From: Tim Lance
- Re: How to remove all .DS_Store files using Terminal?
- From: Mark Conrad
- Re: How to remove all .DS_Store files using Terminal?
- From: Bob Harris
- How to remove all .DS_Store files using Terminal?
- Prev by Date: Re: I SWITCHED!
- Next by Date: Re: How to remove all .DS_Store files using Terminal?
- Previous by thread: Re: How to remove all .DS_Store files using Terminal?
- Next by thread: Re: How to remove all .DS_Store files using Terminal?
- Index(es):
Relevant Pages
|