19884 Views 7 Replies Latest reply: Sep 28, 2007 2:44 PM by tibor.moldovan
I guess "~" is my user name, so "$ cd username/.Trash", am I correct?
No. ~ means 'home directory' and the shell will automatically work that out (so you don't need to). Writing the command exactly as I posted is valid.
BTW — just where is .Trash located?
Umm... it's in your home directory (which is what ~/.Trash means).
Since the filename begins with a period it will be hidden from normal view (including in the Finder).
You can actually, should you desire a more GUI experience, drag-and-drop a folder onto Terminal.app, which will accomplish the same task as Unix's cd.
That is not correct.
Dragging a folder to a terminal window is in no way related to cd.
All that happens is that the path to that folder is written out, as if you'd typed it.
This does not cd to that directory, it doesn't even imply you will cd to that directory after pressing return (unless you manually typed cd before you dragged the folder to the terminal, but the cd is entirely up to you - you might prefer to ls or even rmdir that directory, which are just as valid uses for the drag-and-drop).
If you really needed to open a folder from terminal, you could type in +open /pathtofolder/foldername+
(eg +open .Trash+ )
This may not work if there's something "wrong" with .Trash (meaning it needs to be cleared), but should work for other folders. You can open a new terminal window, which should make your working directory your home directory (~), and then issue +open Desktop+.
For giggles, you can type in +open De+ and then click tab and see what happens.