Results 1 to 3 of 3

Thread: Command Line Basics - When to Use Spaces???

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Location
    Nebraska USA
    Posts
    2

    Command Line Basics - When to Use Spaces???

    Just getting into linux, and it's been years since DOS command line stuff. I can't recall why or when to use spaces in command line entries. Is it optional, it doesn't seem that way. What's the rule for spaces, especially before or after the slash (/) marks?

    Thanks.

  2. #2
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    1,516
    ok space is between the comand and a flag and between flag and whatever.
    like in ls -a which is ls+space+-a+spcae+/home/username/, same with just the comand. just one space like so
    ls /home/username
    which is ls+space+/home/username

    if you have space in a pathname, like:
    ls -a /home/username/my files
    you get errors. that is because it looks for a comand called files. if the space is before a / like :
    ls -a /home/username/my files /new
    that will be seen as new directory to list.
    you can overcome this by using "\" like so:
    Code:
    ls -a /home/username/my\ files\ /new
    or telling the comand that it should treat everything like one lump like so:
    Code:
    ls -a "/home/username/my files /new"
    there are other ways aswell.

    i hope this is what you wanted to know, if not keep asking.

  3. #3
    Junior Member
    Join Date
    Aug 2004
    Location
    Nebraska USA
    Posts
    2
    Thanks, your examples were very good, and I'm clearer on when to use spaces or not. I'm getting a couple cheat sheets on bash commands to further help. Now I've got to find out if installing Knoppix off CD to hard disk is similar to installing something like Xanrdos, PCLinuxOS, etc (re easier for new users).

Similar Threads

  1. boot only in command line - help
    By teccim in forum Hdd Install / Debian / Apt
    Replies: 8
    Last Post: 06-14-2005, 04:09 PM
  2. booting into the command line
    By greygooseplz in forum General Support
    Replies: 1
    Last Post: 11-25-2004, 05:58 AM
  3. Bring up KDE from command line
    By Jesse in forum Hdd Install / Debian / Apt
    Replies: 8
    Last Post: 04-30-2004, 05:57 PM
  4. login with GUI/Command Line
    By wilsondk in forum General Support
    Replies: 2
    Last Post: 02-18-2004, 10:04 PM
  5. Hostname on command line
    By Ambrose in forum General Support
    Replies: 1
    Last Post: 08-08-2003, 02:17 AM

Posting Permissions

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


Samsung 2.5

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot

$100.00



Netac 2TB 1TB 512GB 256GB Internal SSD 2.5inch SATAIII Solid State Drive lot picture

Netac 2TB 1TB 512GB 256GB Internal SSD 2.5inch SATAIII Solid State Drive lot

$549.00



SSD 880EVO SATA III 2.5 4TB INTERNAL SOLID STATE DRIVE picture

SSD 880EVO SATA III 2.5 4TB INTERNAL SOLID STATE DRIVE

$189.99



Samsung 860 EVO 250GB SSD MZ-76E250 2.5

Samsung 860 EVO 250GB SSD MZ-76E250 2.5" SATA III Solid State Drive -

$39.99



Crucial MX500 250GB 2.5

Crucial MX500 250GB 2.5" SATA III SSD - Preowned

$29.00



Crucial MX500 1TB 2.5

Crucial MX500 1TB 2.5" SATA III Internal SSD CT1000MX500SSD1

$99.99



2 PACK 128 GB SSD M.2 2280 SATA Solid State Drive Major Brands, Samsung, LiteON picture

2 PACK 128 GB SSD M.2 2280 SATA Solid State Drive Major Brands, Samsung, LiteON

$28.00



Fanxiang 256GB 512GB 1TB 2TB 4TB SSD Lot 2.5'' SATA Internal Solid State Drive picture

Fanxiang 256GB 512GB 1TB 2TB 4TB SSD Lot 2.5'' SATA Internal Solid State Drive

$42.99



Samsung 860 EVO 250GB, SATA III, 2.5

Samsung 860 EVO 250GB, SATA III, 2.5" Internal Solid State Drive - Black...

$30.00



Intel Solid-State Drive DC S3500 Series 240GB Internal 2.5

Intel Solid-State Drive DC S3500 Series 240GB Internal 2.5" (SSDSC2BB240G4P) SSD

$29.99