7 Replies Latest reply: Sep 28, 2007 2:44 PM by tibor.moldovan
Roy Close Level 1 Level 1 (85 points)
Folks

Sorry, but I'm 'way out of my depth dealing with unix, but I know it's mighty interesting, and I just wish I had time to learn it, but...! Here's my need:

My Trash is so full it won't open just by mouse click! I need to check it before I Empty Trash. What is the command/string I need to open the folder, please?

Anybody help me, please?

Regards

Roy

G5 Dual 1.8ghz 1.5mb RAM, Mac OS X (10.4.10), 2nd Seagate 500gb HD; Ext LaCie 120gb; Ext Seagate 400gb
  • Camelot Level 8 Level 8 (46,440 points)
    You don't really 'open' directories in the terminal. You can change to a directory using cd, and you can list the contents of a directory using ls. You can also remove files using rm:

    <pre class=command>$ cd ~/.Trash
    $ ls
    <file listing>
    $ rm some.file</pre>
  • Roy Close Level 1 Level 1 (85 points)
    Tks, Camelot

    I guess "~" is my user name, so "$ cd username/.Trash", am I correct?

    BTW — just where is .Trash located?

    Roy
  • Camelot Level 8 Level 8 (46,440 points)
    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).
  • Roy Close Level 1 Level 1 (85 points)
    Tks Camelot

    Duhhh — I was adding the String [$] symbol, so of course, it didn't work!

    VMT/...- -- -/Very Many Thanks

    Roy
  • Carla Hufstedler Level 1 Level 1 (15 points)
    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.
  • Camelot Level 8 Level 8 (46,440 points)
    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).
  • tibor.moldovan Level 1 Level 1 (125 points)
    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.