Results 1 to 8 of 8

Thread: help using the command line

  1. #1
    Join Date
    Jul 2012
    Beans
    88

    help using the command line

    Hi Everyone
    If I had any hair left I'd be pulling it out, around about now. I've read the instruction website telling you how to execute some basic commands in the terminal, but I can't get them to work

    I'm trying to check my iso is good before I burn it. So in the terminal is saids

    kojak@kojak-OptiPlex-760:~$

    so I type in pwd and it says
    /home/kojak
    kojak@kojak-OptiPlex-760:~$

    then I typed in ls and it says
    Calibre Library Documents Music Public Videos
    Desktop Downloads Pictures Templates
    kojak@kojak-OptiPlex-760:~$

    so then I type in
    cd /home/kojak/downloads

    and it says
    bash: cd: /home/kojak/downloads: No such file or directory
    kojak@kojak-OptiPlex-760:~$

    and I've tried all sorts of combinations, but nothing. So what am I doing wrong

    Thanks
    Last edited by Kojak Peg; May 11th, 2013 at 11:02 PM.

  2. #2
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,243
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: help using the command line

    names are case sensitive, Downloads is not the same as downloads

    learn to use tab for autocompletion
    eg cd Do[tab] will put the whole name for you so you minimize risk of typos, in case there are multiple matches to what you typed you can get them printed with [tab]x2, eg
    cd D[tab][tab] will produce Desktop Downloads, so you can add few more chars to remove ambiguosity and use [tab] again to autocomplete.

    and use ~ as a shorthand for /home/yourname
    eg cd ~/Desktop
    Last edited by Vaphell; May 10th, 2013 at 03:16 PM.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  3. #3
    Join Date
    Apr 2006
    Beans
    569
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: help using the command line

    It's case sensitive. 'Download' not 'downloads'.

  4. #4
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    6,383
    Distro
    Ubuntu Development Release

    Re: help using the command line

    When we open a terminal we are already in /home/ourusername. This is what you confirmed when you typed pwd. The command means print working directory. So, you did not need to type the path /home/kojak/Downloads. Just cd Downloads. If you type pwd when you are in the Downloads directory you will get /home/username/Downloads. But the command prompt should be telling you which directory you are in. kojak@kojak-Optiplex-760:~Downloads $. A change from kojak@kojak-Optiplex-760:~$

    It is as clear as mud.
    Last edited by grahammechanical; May 10th, 2013 at 03:35 PM.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  5. #5
    Join Date
    Jul 2012
    Beans
    88

    Re: help using the command line

    Thanks everyone I know it would be simple, but is b***d hard when you don't know how, lol

    cheers

  6. #6
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,432
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: help using the command line

    You can also drag files and folders to the terminal to fill in their paths.

    For instance, type 'cd ' and don't hit Enter. Drag the Downloads folder to the terminal and its full path will appear. Press Enter and you will change directory to the folder you dragged in.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  7. #7
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

  8. #8
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: help using the command line

    +1 for tab completion. It's possibly the single handiest feature of the shell.
    Keep learning and trying, once you are somewhat familiar with the CLI GNU/Linux in general becomes much, much less scary.

Bookmarks

Posting Permissions

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