Page 1 of 3 123 LastLast
Results 1 to 15 of 44
  1. #1

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    I need Unix help
    Can someone please tell me how to access directories higher than my root directory?

    ~Thanks
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

  2. #2

    lifeafter2am's Avatar
    Member Since
    Aug 25, 2006
    Location
    Central Florida
    Posts
    1,395
    Specs:
    MacBook Pro Unibody
    Higher than / ? There is nothing higher than / , that is why it's called root.
    masakatsu agatsu

    @lifeafter2am

  3. #3

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    Sorry, I meant home directory. I figured it out, though.

    cd /Volumes/"Macintosh HD"
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

  4. #4

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,881
    Specs:
    Way... way too many specs to list.
    you can also cd / which nets the same thing, and is less typing
    mike
    This machine kills fascists
    Got # ? phear the command line!

  5. #5

    clint1986's Avatar
    Member Since
    Mar 06, 2008
    Location
    Devon, United Kingdom
    Posts
    129
    Specs:
    17" eMac 1.42 GHz G4, Mac OS X 10.4 "Tiger"
    Also, to move to directory above the current directory do this: cd ..

    The two dots represent the directory above, so if you are in /home/folder1/ and wanted to be in /home/folder2/ you could simply do this: cd ../folder2/

    Cool, no? :)

  6. #6

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    Thanks for all the helpful hints. Less typing=me being happier. So, the reason I asked is so I can get rid of this file. I've tried using

    sudo rm -r /Volumes/"WINDOWS HD"/.Trashes/502/?␀␀␀ö?␀␀.?␀␀

    but it says, "File name too long".

    How can I get that file to go away? By the way, can anyone tell me why a weird file on my windoze partition would cause that problem when I delete trash in OS X?

    ~Damien
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

  7. #7


    Member Since
    Sep 27, 2006
    Location
    Edmonton AB
    Posts
    70
    Easiest way to get to your home directory is cd $home

  8. #8

    clint1986's Avatar
    Member Since
    Mar 06, 2008
    Location
    Devon, United Kingdom
    Posts
    129
    Specs:
    17" eMac 1.42 GHz G4, Mac OS X 10.4 "Tiger"
    In that directory, is it the only file named like that?

    If so, try this: sudo rm /Volumes/"WINDOWS HD"/.Trashes/502/?*

    This will delete ANY file with a "?" in front of its name, so be sure it the only one named this way first, otherwise you might knock out something else you don't want to.

    If the file is actually a directory, use this instead: sudo rm -rf /Volumes/"WINDOWS HD"/.Trashes/502/?*

  9. #9


    Member Since
    Jan 24, 2008
    Posts
    12
    "?" is a Wildcard as well
    Be very careful with the use of wildcards and rm. Remember that in Unix, the question mark (?) is also a wildcard that means to match any one character. Thus your command "rm -rf /Volumes/"WINDOWS HD"/.Trashes/502/?*" will silently and recursively delete all files (and directories) that have at least one character in their name. Speaking of other nasties, absolutely do NOT issue that command "rm -rf .*" as this will silently and recursively delete all files beginning with a dot, including ".." which as has been previously stated is the directory above the present location. This means that if you were in say /usr/pmix and issued the offending command, you would erase not only /usr/pmix (and the targeted hidden files, but you would also erase all of /usr. I had a novice SA do this on a cluster once, spent the next four hours rebuilding the thing.

  10. #10

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    That didn't work. Anything else I can try?
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

  11. #11

    walkerj's Avatar
    Member Since
    Feb 13, 2005
    Location
    New Orleans, LA, USA
    Posts
    1,186
    Specs:
    13" Macbook Pro 2.26Ghz Unibody 4G RAM 160G HDD Superdrive
    To tackle this one, I'd try to get a better idea of what characters that file is actually made up of. So I'd do something like (in Terminal.app) position myself in the .Trashes directory, then do a

    $ ls | od -c

    To get od (do a man on it, I forget what it stands for but it's a character dump utility) to show the characters to give you a better chance at forming an appropriate rm arg to get rid of the file. For example, currently I have two files in my .Trash:

    Audio Hijack Pro.app cure-b-sides.jpg

    ls | od -c

    0000000 A u d i o H i j a c k P r o
    0000020 . a p p \n c u r e - b - s i d e
    0000040 s . j p g \n
    0000046


    Now I don't have any weird charactered file in my trash, but since you do, you might get a somewhat useful character representation of what that file really is named.

  12. #12

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    This is what I get when I try that:

    What do I do now?
    Attached Images Attached Images
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

  13. #13

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    BTW, why was this thread moved to "Windows, Linux, and Other OS"? It's about using Unix, the basis for Mac OS X.
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

  14. #14

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,881
    Specs:
    Way... way too many specs to list.
    can you do the following and just cut and paste the output?

    ls -al /Volumes/"WINDOWS HD"/.Trashes/502/

    File attributes may help figuring out how to get rid of it.
    mike
    This machine kills fascists
    Got # ? phear the command line!

  15. #15

    Thundermoon1994's Avatar
    Member Since
    Dec 26, 2006
    Location
    Kent, OH
    Posts
    495
    Specs:
    15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
    damien-hand-cannanes-macbook-pro:502 Damien$ ls -al /Volumes/"WINDOWS HD"/.Trashes/502
    ls: \004␀␀␀ö\001␀␀.\024␀␀: File name too long
    damien-hand-cannanes-macbook-pro:502 Damien$
    -- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
    -- 8 GB iPhone 3G -- 30 GB iPod Video --

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unix Files
    By jpforum in forum OS X - Operating System
    Replies: 8
    Last Post: 05-30-2014, 08:09 PM
  2. Unix
    By gagnerants in forum Running Windows (or anything else) on your Mac
    Replies: 7
    Last Post: 03-02-2009, 05:17 AM
  3. UNIX Plates
    By Aeaus in forum Schweb's Lounge
    Replies: 4
    Last Post: 10-18-2008, 05:26 PM
  4. help with unix prog
    By shizzle in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 10-01-2005, 02:28 PM
  5. Unix
    By psychotoe in forum OS X - Development and Darwin
    Replies: 6
    Last Post: 06-16-2004, 03:46 PM

Posting Permissions

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