VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Monday = college exam. There can supposedly be 6 different ways to get to your home directory. These are the ones I get:

    % cd
    % cd .. (if you're one under it)

    But I'm blanking out on the rest. I know at least two of them involved this character (~). Please help, it's a guaranteed test question. That's what I get for sleeping. College is no place for a 31 year old man
    Quote Quote  
  2. Член BJ_M's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Search Comp PM
    if you have to take a test ... be good to learn them yourself...

    also i just checked and they are all listed on google ..


    here is a nice little start for you anyway http://www.allcommands.org/linux%20commands%20list.html
    Quote Quote  
  3. Member
    Join Date
    Jun 2002
    Location
    MO, US
    Search Comp PM
    Personally, I always like to use
    Code:
    cd `awk -F':' "/^\`whoami\`:/ {print \\$6;}" < /etc/passwd`
    Quote Quote  
  4. No Longer Mod tgpo's Avatar
    Join Date
    Feb 2002
    Location
    The South Side
    Search Comp PM
    cd ~
    Quote Quote  
  5. Originally Posted by sterno
    Personally, I always like to use
    Code:
    cd `awk -F':' "/^\`whoami\`:/ {print \\$6;}" < /etc/passwd`

    Dude... You cost me a perfect score with that BS!



    j/k... thanks for the help gang.
    Quote Quote  
  6. Member
    Join Date
    Jun 2002
    Location
    MO, US
    Search Comp PM
    How about
    Code:
    eval `egrep "^\`whoami\`:" /etc/passwd | cut -f6 -d: | sed 's/^/cd /'`
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!