LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: ls-l:command not found (https://www.linuxquestions.org/questions/linux-newbie-8/bash-ls-l-command-not-found-835904/)

umeshgupta1987 10-03-2010 06:44 AM

bash: ls-l:command not found
 
i m getting this kind of error every time. when i am using different option with commands.. Like i have used ls-l. Then Got the error
bash: ls-l:command not found.


Please help in this case....

David the H. 10-03-2010 06:46 AM

ls is the command, -l is the option. There's a space between them. ls -l.

Edit: To clarify:

A command consists of one or more "words" separated by blank space.

The first word is the command name.
Code:

(Two simple commands.  Command will run using default parameters)
ls
gedit

After that come options, which control the behavior of the command. These are usually preceded by - or --.
Code:

ls -l
gedit --help

Then there are arguments. These are usually the filenames or other strings that the command will operate on.
Code:

ls -l /home
gedit filename.txt

Sometimes an option is also followed by an extra argument or added setting.
Code:

ls --color=always
firefox --new-window http://www.linuxquestions.org

And finally, multiple short options can often be combined, if they don't need to be followed by extra arguments.
Code:

ls -al
(This is the same as "ls -a -l")



All times are GMT -5. The time now is 02:25 PM.