Vikram
Vikram

Reputation: 2069

l (lowercase L) command in bash terminal

vikram@vikram-Studio-XPS-1645:~/comp$ l
3rdParty/    que.ico     SE32.EXE   start.fgx  Supp/         WebResources/
autorun.inf  Readme.txt  START.EXE  start.fgz  Walkthrough/
vikram@vikram-Studio-XPS-1645:~/comp$ ls
3rdParty     que.ico     SE32.EXE   start.fgx  Supp         WebResources
autorun.inf  Readme.txt  START.EXE  start.fgz  Walkthrough
vikram@vikram-Studio-XPS-1645:~/comp$ 

What is the difference between these two commands?

I tried $ which l, but there's no output.

Also no result for $ man l.

I also tried unsuccesfully to Google it.

Upvotes: 7

Views: 6134

Answers (4)

K2-Beast
K2-Beast

Reputation: 13

The way to find if its alias is to check ~/.bashrc file

$sudo cat ~/.bashrc | grep 'alias l='
alias l='ls -CF'

Upvotes: 0

Ilia
Ilia

Reputation: 1

it's specific bash command for "ls".

ilia@Latitude-E6410:~$ mkdir ltest
ilia@Latitude-E6410:~$ cd ltest
ilia@Latitude-E6410:~/ltest$ echo 321 > 321.txt
ilia@Latitude-E6410:~/ltest$ echo 123 > 123.txt
ilia@Latitude-E6410:~/ltest$ ls
123.txt  321.txt
ilia@Latitude-E6410:~/ltest$ l
123.txt  321.txt
ilia@Latitude-E6410:~/ltest$ whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz
ilia@Latitude-E6410:~/ltest$ whereis asdasdasd #This command doesn't exists
asdasdasd:
ilia@Latitude-E6410:~/ltest$ whereis l #Results of "whereis l" and "whereis asdasdasd" are same
l:
ilia@Latitude-E6410:~/ltest$ sh #Try "l" in sh
$ ls #"ls" is working
123.txt  321.txt
$ l #But "l" doesn't
sh: 2: l: not found
$ 

Upvotes: -1

Keith Thompson
Keith Thompson

Reputation: 263267

l is probably an alias for something like ls -F. The -F option causes ls to append / to directory names, * to executable regular files, etc.

UPDATE : Based on your comment, l is aliased to ls -CF. Single letter options can be "bundled", so ls -CF is equivalent to ls -C -F. The -C option causes ls to list entries by columns. This is the default if ls thinks it's writing to a terminal; the -C option makes it behave this way unconditionally. (ls -1 lists one entry per line, which is the default if ls is *not writing to a terminal.)

type -a l should show you how it's defined. It's probably set in your $HOME/.bashrc.

(The $ is part of your shell prompt, not part of the command.)

Upvotes: 18

jeffchong07
jeffchong07

Reputation: 552

As far as I know there is no general command 'l' that exists or even does what 'ls' does that's why your results for which l and man l are empty

Do you have something on your path called l that perhaps runs ls?

Upvotes: 0

Related Questions