abc123
Posts: 2
Joined: Mon Feb 04, 2013 4:59 pm

ls / command

Fri Feb 08, 2013 10:11 am

im using the recommended Debian os and when i put ls into the command line to get a list of my directories all it comes back with is -
' bin dev home lost+found mnt proc run selinus sys usr boot etc lib media opt root sbin srv tmp var'
the tmp is highlighted in green.
we put the same command in on my mate pi using Debian and his returned a load more directories. does this mean i haven't load Debian onto the SD properly ?

User avatar
Wizard
Posts: 120
Joined: Sun Aug 19, 2012 4:52 am
Location: Sweden

Re: ls / command

Fri Feb 08, 2013 10:35 am

ls lists files and directories in the current, or specifiec, pwd (path).
By default ls omitts dot-files (.whatever) but takes plenty of parameters.

ls -F gives a "full" list but omitts hidden files.
ls -al lists all files and with long description.

It's common to add an alias to ls in .bashrc in order to always execute with your favourite flags.

e.g

alias ls = ls -alF

The folders you see looks correct to me. Perhaps you ran the "ls" command in your friends home-folder and thus saw a different file structure?

see man ls for further reading.
Raspberry Pi - finally a worthy replacement for A500!!!

Return to “Beginners”