[robg adds: Yes, this is a simple hint ... but if using rm in the Terminal makes you a bit apprehensive, mving those items to the trash instead will give you one more level of safety.]
|
|
|
Since the "Trash" is just another folder on the filesystem, from the Terminal you can send items to the trash instead of deleting them by simply issuing a mv file_or_folder_name ~/.Trash/ instead of using rm file_or_folder_name, which permanently deletes things.
[robg adds: Yes, this is a simple hint ... but if using rm in the Terminal makes you a bit apprehensive, mving those items to the trash instead will give you one more level of safety.]
•
[8,366 views]
Hint Options
Utilize the trash from the Terminal
Have a look at Gary Kerbaugh's rrm script:
Iv'e done this and had some problems.
the trouble with this hint is that it does not quite handle the possible flags on rm gracefully. in particular rm -r.
instead you could alias it to a perl script.
this script just silently removes any command line argument begininng with a "-".
It will of course fail for any file whose name really does start with a dash.
Utilize the trash from the Terminal
Then of course it's still a bit more complex than that.
Utilize the trash from the Terminal
Gary's script handles this.
Utilize the trash from the Terminal
trash, which is a part of the osxutils package, behaves like finder but from the command line. osxutils is available via fink or
Script does not operate as advertised.
I just checked out the 'trash' script from that package. It does <i>not</i> operate like the Trash, only from the command line. The script merely moves the file to the ~/.Trash folder, checking to make sure the subpath names are created. But what it does not do is check to see if there is a name collision. That is, it does not check if it would be overwriting an existing file in the trash. That's a serious omission. In addition, it only uses the UNIX 'mv' command, rather than using CpMac or ditto or something else.
Utilize the trash from the Terminal
this post requires member access.
Utilize the trash from the Terminal
yea that was strange, I really hope that macosxhints doesn't move to this model. There are several websites I just stoppped bothering with becuase I didn't feel like logging in eveytime I opened one of their articles using my news reader. This was even more of a pain because i'd have 50 windows open and not even remember what the article that I was supposed to read was about so i'd just close the window. PLEASE say it isn't so. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.12 seconds |
|