Ls -1 command line


#1

https://www.codecademy.com/courses/learn-the-command-line/lessons/manipulation/exercises/ls-a?action=lesson_resume&link_content_target=interstitial_lesson

I'm doing as it ask. im confused any ideas? ls -1??????


#2

It looks like a 1 is but is actually an l (small L). This is why it is recommended we do not name variables l in programming.


#3

i'm typing ls -1 might be a bug?


#4

Instead of

ls -1

use

ls -l

#5

dumb question but whats the difference?


#6

The first is a numeral, 1
The second is a letter, l


#7

I think its a bug ls -1 prints all my directory contents. using the small " l "


#8

$ ls
action  comedy  drama  genres.txt
$ ls -1        
action
comedy
drama
genres.txt
$ ls -l
total 12
drwxr-xr-x 4 ccuser ccuser 4096 Sep 13  2015 action
drwxr-xr-x 3 ccuser ccuser 4096 Sep 13  2015 comedy
drwxr-xr-x 4 ccuser ccuser 4096 Jul  8  2015 drama
-rw-r--r-- 1 ccuser ccuser    0 Jul  8  2015 genres.txt
$

No bug, just different switches.


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.