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 ...
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.
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.
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.
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.
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.
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.
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.
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'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'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?
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.
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.
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.