+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
Mac Thread, Show all folders, empty Trash? in Technical; Is their a way I can empty users /.Trash folders via WGM or ARD, or see these folders in the ...
  1. #1
    theeldergeek
    Guest

    Question Show all folders, empty Trash?

    Is their a way I can empty users /.Trash folders via WGM or ARD, or see these folders in the users space on my xserve? Much like Windows can see hidden files/folders in Explorer, is their a Mac alternative?

    My aim is to try and be able to empty users /.Trash folders for them, as I am getting a HUGE amount of data hogging space on my server which is being held in users /.Trash folders.

    Users will be 'educated' that these folders will be emptied periodically, so they should not store files or folders they wish to retain in there (yes, I have known users who used the Windows Recycle Bin for storing files!) but I need an easy way to access the folders so I can simply delete whatever is in there.

    Possible?

  2. #2

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,190
    Thank Post
    299
    Thanked 215 Times in 185 Posts
    Rep Power
    56
    i Think the trash folder/file is hidden. You may just need to make it visible to delete the .trash folder. There is a command for terminal that can do this for you. Or you can get an application that does the same thing. I've never done this on the Server before though.

    Once example:

    Apple - Downloads - UNIX & Open Source - Change Finder

    You could then crete a script that deleted the users' .Trash file from each of their Home dirs. You could probably do this bit with out the first bit though
    Last edited by HodgeHi; 21st April 2010 at 03:29 PM.

  3. Thanks to HodgeHi from:


  4. #3


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,706
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Server Cleanup 3 is what you need. Try it on a test user first though.
    Attached Images Attached Images

  5. Thanks to Arthur from:

    dayzd (25th May 2010)

  6. #4
    theeldergeek
    Guest
    Quote Originally Posted by HodgeHi View Post
    i Think the trash folder/file is hidden. You may just need to make it visible to delete the .trash folder. There is a command for terminal that can do this for you. Or you can get an application that does the same thing. I've never done this on the Server before though.

    Once example:

    Apple - Downloads - UNIX & Open Source - Change Finder
    I found that with that little util, once you had run it, there was no hope of deleting it as it kept telling me there was a file in use. I downloaded it to a "Downloads" folder, and ran it from there. When I went to move it somewhere else as I decided I'd keep it at that stage, I couldn't. When I went to delete it, I couldn't. Then it corrupted in some way and wouldn't run at all... I had to log in as a local admin user, delete the program, then log back in as me. I've decided not to keep it.

  7. #5
    theeldergeek
    Guest
    Quote Originally Posted by Arthur View Post
    Server Cleanup 3 is what you need. Try it on a test user first though.
    Looks perfect for the job, shame I only have live data to play with, I daren't give it go!

  8. #6

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,190
    Thank Post
    299
    Thanked 215 Times in 185 Posts
    Rep Power
    56
    Where in the Users home dirs is the trash found?

    If they are at the root of the users' home dirs then perhaps something like

    rm /UserHomeShare/*/.Trash

    The * is used to replace the user name. It should traverse each account listed in the homeshare and then delete the .trash file in each user home dir.

    Make a back up first though.

    You could maybe test the process with a separate share with a copy of home dirs in side.

  9. #7
    AntonioRocco's Avatar
    Join Date
    Oct 2008
    Location
    South Yorkshire
    Posts
    262
    Thank Post
    9
    Thanked 112 Times in 95 Posts
    Rep Power
    39
    Hi

    Just to add to Mark's excellent suggestion. Probably the most dangerous command to use is the "rm" command. In my view it's best to add some options as there are no undos once the command is run and there have been many who've ran the command and ended up removing more than they bargained for!

    sudo rm -R -v -i /pathtowherever

    Would provide feedback as well as slightly safeguarding what you're about to do. The -R option in rm attempts to remove the file hierarchy rooted in the directory path. The -v option means verbose - visual feedback basically and the -i option prompts for confirmation. User either responds with y or n (yes/no). If there are hundreds and hundreds of files I would not use the -i option.

    To permanently remove files rooted in a Users Trash the command would be:

    sudo rm -R -v -i /Users/username/.Trash/*

    With ARD you would remove "sudo" and run the command as root.

    You could approach this another way? With WorkGroup Manager you can use the Mobility Preferences to "cache' the User's profile on the local drive when first logging in. User works as normal and on successful logout and sync everything would be deleted from the local drive. You use WGM to define what is synced on logout. In your case (if I've understood you correctly) define Desktop and Documents and nothing else. Whatever is in the trash will be gone.

    Hope this helps?

    Antonio Rocco (ACSA)
    Last edited by AntonioRocco; 23rd May 2010 at 09:58 AM.

  10. #8
    theeldergeek
    Guest
    Quote Originally Posted by AntonioRocco View Post
    You could approach this another way? With WorkGroup Manager you can use the Mobility Preferences to "cache' the User's profile on the local drive when first logging in. User works as normal and on successful logout and sync everything would be deleted from the local drive. You use WGM to define what is synced on logout. In your case (if I've understood you correctly) define Desktop and Documents and nothing else. Whatever is in the trash will be gone.

    Antonio Rocco (ACSA)
    Me being me, I prefer this option. As you know, I'm not very good with 'command line' operation, so I'm very cautious of going down this route. I will obviously need to empty the trash folders already on the server, but if I can achieve what you suggest, then trash wouldn't be an issue moving forward. I'll look into this, thanks.

  11. #9
    RingOfFlame's Avatar
    Join Date
    Nov 2009
    Posts
    192
    Thank Post
    101
    Thanked 69 Times in 42 Posts
    Rep Power
    36
    Maybe about time to learn the command line then?

  12. #10
    theeldergeek
    Guest
    Quote Originally Posted by RingOfFlame View Post
    Maybe about time to learn the command line then?
    I'll pick it up as I go along. This time 18 months ago, I wouldn't have even attempted half of what I now do on a daily basis with my Mac network, so whilst progression on the Mac side of things is not as fast as it might be, it gets me by and I have come a long way with my learning, much thanks to this particular forum for that.

  13. #11

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,190
    Thank Post
    299
    Thanked 215 Times in 185 Posts
    Rep Power
    56
    Quote Originally Posted by theeldergeek View Post
    I'll pick it up as I go along. This time 18 months ago, I wouldn't have even attempted half of what I now do on a daily basis with my Mac network, so whilst progression on the Mac side of things is not as fast as it might be, it gets me by and I have come a long way with my learning, much thanks to this particular forum for that.
    I am exactly the same.

  14. #12
    RingOfFlame's Avatar
    Join Date
    Nov 2009
    Posts
    192
    Thank Post
    101
    Thanked 69 Times in 42 Posts
    Rep Power
    36
    Quote Originally Posted by theeldergeek View Post
    I'll pick it up as I go along. This time 18 months ago, I wouldn't have even attempted half of what I now do on a daily basis with my Mac network, so whilst progression on the Mac side of things is not as fast as it might be, it gets me by and I have come a long way with my learning, much thanks to this particular forum for that.
    Are your employers aware you are not up to speed with the infrastructure you support?

  15. #13

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,785
    Thank Post
    572
    Thanked 2,151 Times in 981 Posts
    Blog Entries
    23
    Rep Power
    625
    Quote Originally Posted by RingOfFlame View Post
    Are your employers aware you are not up to speed with the infrastructure you support?
    The amazing thing about IT is the sheer scale of it. Most people have a 'starting point'. This will be the point at which they enter the IT profession. From here they will have to learn not only current systems, but those in the past and 'sideways' onto other platforms too. Your comment is both naive and ill thought out. I know of no one working in IT who knows everything, and everyone starts somewhere.

  16. 2 Thanks to Dos_Box:

    frosty (24th May 2010)

  17. #14
    theeldergeek
    Guest
    Quote Originally Posted by RingOfFlame View Post
    Are your employers aware you are not up to speed with the infrastructure you support?
    No, I don't know everything there is to know about the infrastructure I support, and yes, my employer is fully aware of this.

    Part of my job is to find out solutions to problems that occur, and in the main, I do find solutions. I've been working in IT since the mid 90's, and there isn't a day gone by where I've had the answer to every single issue I've come across.

    I do my current job better than the ability which is expected of me AFAIC, which I would suggest is the same for the majority of technicians.

    As you have of course read the thread in it's entirety, you acknowledge that the issue being discussed isn't one of supporting the infrastructure, it is one of improving it, to make my job (and those of my colleagues) easier. As things stand, I can actually support the current infrastructure perfectly adequately.

    I don't have a problem with admitting IT is a constant learning curve. The day it becomes less than that, is the day I resign and go do something else.
    Last edited by theeldergeek; 24th May 2010 at 08:31 PM.

  18. #15
    RingOfFlame's Avatar
    Join Date
    Nov 2009
    Posts
    192
    Thank Post
    101
    Thanked 69 Times in 42 Posts
    Rep Power
    36
    Quote Originally Posted by Dos_Box View Post
    The amazing thing about IT is the sheer scale of it. Most people have a 'starting point'. This will be the point at which they enter the IT profession. From here they will have to learn not only current systems, but those in the past and 'sideways' onto other platforms too. Your comment is both naive and ill thought out. I know of no one working in IT who knows everything, and everyone starts somewhere.
    No my comment is valid. I am not suggesting someone needs to know everything regarding IT but If someone is taken on to do a job then they should be able to support that system from the start. As new systems are added training should take place on these new systems and then the support given will be fit for purpose.

    There is a lot of talk on these boards regarding support frameworks, qualifications and training and how this is what is needed for schools to receive the correct service, yet your comments above advocate the learn as you go alone, know just enough style of support.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Unable to empty trash - permissions problem
    By theeldergeek in forum Mac
    Replies: 18
    Last Post: 2nd December 2009, 09:38 PM
  2. Roaming profiles + empty folders
    By mullet_man in forum Windows
    Replies: 1
    Last Post: 19th October 2009, 10:44 AM
  3. find and delete empty folders
    By RabbieBurns in forum Scripts
    Replies: 3
    Last Post: 9th February 2009, 10:16 AM
  4. Empty files and folders on a shared area
    By ranj in forum Windows
    Replies: 6
    Last Post: 6th January 2009, 12:11 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •