Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dr. Mike's Dumb Question #8344547 - Macs are polluting my hard drive space
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Dr. Mike's Dumb Question #8344547 - Macs are polluting my hard drive space

drmikedrmike Member
edited October 2011 in General

Greets:

I've um been collecting some files recently and I guess those collections were all put together on a Mac as i have hundreds of .DS_Store files in there.

I hate doing greps.

Anyone care to come up with a grep that would search and delete all files named .DS_Store?

I see this:

http://nixcraft.com/linux-software/256-grep-remove-files.html

which would give me this:

grep -E "/[0-9]" .DS_Store | xargs rm

but that 0-9 is concerning me.
Thanks

edit; just to clarify, that grep appears not to work. It doesn't find anything.

Comments

  • [0-9] means all digits 0 through 9 (base 10 math).

  • @Xeoncross, I gathered that. :)

    I misread the thread. I'm back to searching Google. (And listening to some woman here in Panera Bread brag about how she knew Steve Jobs and how she knows that he left 4 years worth of ideas and guidance to the company.)

  • I got this

    find / | grep "/\.DS_Store$" | xargs rm
    

    Maybe you can try it without the last pipe just to see if it suits for you

  • drmikedrmike Member
    edited October 2011

    I have to ask. Why the /\ and the trailing $? That is the file name so is it really needed? Seriously asking.

    Works though. (edit: And with the /\ and the $ marks.) Thanks.

  • Simple solution. Format the hard drive and install windows, :) Problem sorted.

  • @DanielM how could I run that mud if I stuck windows on there?

    Plus I would have to get rid of all those cough items I've been cough collecting to do the format. ;)

  • Besides if he has problems now drop windblows on there and watch as he has to reformat daily.

  • find / -name '.DS_Store' -print0 | xargs -t0 rm
  • I must say that i the first time that I have seen someone recommend Suckdows over Mac.
    Personally I always thought you went Suckdows --> Mac --> Linux.

  • Do we really have to choose between "suckdown" and "sucked up"? :-)

  • The @subsub is a better one n_n

    About mine, the backslash was to escape the period (.) and the $ is to indicate that the string ends with that pattern.

  • Everyone move to MINIX, then we're all be happy.

  • AmigaOS?

  • ReactOS FTW!

  • kylix said: ReactOS FTW!

    That is the sweet point n_n

  • MrAndroidMrAndroid Member
    edited October 2011

    Cough in OS X theres a function for disabling and removing these

    DanielM said: Simple solution. Format the hard drive and install windows, :) Problem sorted.

    I had a reply to this, but Windows had a BSOD.

    At the end of the day, Windows desktop.ini's are even more annoying,

  • XeoncrossXeoncross Member
    edited October 2011

    .gitignore

    # Linux
    .*
    !.gitignore
    *~
    
    # OS X
    .DS_Store
    # Thumbnails
    ._*
    
    # Windows
    Thumbs.db
    Desktop.ini
    

    I really wish they were just all simple .sqlite files or something that would appear useful.

  • Xeoncross said: I really wish they were just all simple .sqlite files or something that would appear useful.

    SQLite wouldnt fit Microsofts needs since its like open source (I think), so their have to rebuild it and do it completely differently, not standard compliance and call it mssqlite.

  • SQLite wouldnt fit Microsofts needs since its like open source (I think), so their have to rebuild it and do it completely differently, not standard compliance and call it mssqlite.

    At least they provide professional support for ages for it.

  • kylix said: At least they provide professional support for ages for it.

    Didn't Microsoft get the worst support award?

    Everyone knows that LinuxForums.org gets things finished faster then calling Microsoft, who will tell you to goto the manufacturer, who will then tell you to goto Microsoft.

    I've had a ticket open at Xbox for 2 years.

  • kylixkylix Member
    edited October 2011

    We had XServers here until Apple decided after about just 4 years to suddenly stop supporting them completely. The whole line. No hardware replacements, no software support, nothing. We have XP-systems for accounting which is still supported for the drivers of the old hardware, software updates etc.

    We have been running Linux environments for ages. But you always end up with critical errors where you won't find somebody responsible. You can then switch back or try to solve the error on your own. Or, if you can afford, pay a third-party. Very resource-eating.

    I'm using Linux and Apple for private use quite fine. But on a professional level in terms of small to mid-sized companies those both solutions are not quite satisfactory. Microsoft support is quite great in SME cases.

    I've had a ticket open at Xbox for 2 years.

    I can't talk about gaming as I simply don't play on my computers.

  • kylix said: I'm using Linux and Apple for private use quite fine. But on a professional level in terms of small to mid-sized companies those both solutions are not quite satisfactory. Microsoft support is quite great in SME cases.

    RedHat, Novell and Oracle are there to help if your a business. Their doing a pretty good job. Novell have just signed a contract with Microsoft to try and protect Linux.

  • Microcrap supports what they want to when they want to. Nothing more nothing less. Windows xp was the best OS they have had in years. They will continue to support because they convinced the majority of the business owners they "HAD" to have it. They were going to stop supporting it years ago until people threw a down right fit. Then they "decided" they needed to support it longer.

    Most people do not even use XP to its potential let alone Windblows-7. They never will because because the GUI is horrible and it hides functions people really should look after themselves.

    All Microcrap did was make it so people who should not use or have computers to be able to use them and screw things up. I have always said there should be a test for owning a computer just like a driver's license. You do not pass the test then you do not own a computer. The cookie cutter mentality has really ruined a lot of things that should not have been even thought up in the first place.

  • I know one of the first things that I did when I got a Mac, learning some basic shell and this was 7+ years ago.

    OS X and Linux forces you to go into the Shell, because theres loads of interesting things that you can't do in a UI, where as Windows hides the crappy ones its got.

  • I started with an apple II PC. If most people had to start from the point of no "GUI" they would be much better off. All a GUI does really is make the mouse a viable computer extension. Oh and use more ram then it is really worth.

    Anything that cab be done in Windblows with a gui can be done in Linux without one. Difference is Linux makes you have to think and learn and Windblows does not.

  • Anything that cab be done in Windblows with a gui can be done in Linux without one.

    View a jpg? :D

  • You can view a jpg in Linux with no GUI. Might not see it as a picture but as code but it can be done lol.

  • Returning to the OP's question I'd use

    find / -name "*.DS_Store" -exec rm -f {} \;

    Which will work even for file names with spaces in them. (And yes you DO need all that punctuation on the end)

    Thanked by 1drmike
  • That's more of what I'm used to using. thanks.

Sign In or Register to comment.