Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 864
Vikram Avatar asked Mar 12 '12 19:03

Vikram


People also ask

How do you lowercase in bash?

To convert a string to lowercase in Bash, use tr command. tr stands for translate or transliterate. With tr command we can translate uppercase characters, if any, in the input string to lowercase characters.

What does L flag do in bash?

The -l option (according to the man page) makes "bash act as if it had been invoked as a login shell". Login shells read certain initialization files from your home directory, such as . bash_profile . Since you set the value of TEST in your .

What does bash l mean?

If you type bash -l. at a shell prompt, it will invoke a new shell process (the -l makes it a login shell). If you exit that shell process, you'll be back to your original shell process. Typing exec bash -l. means that the new shell process replaces your current shell process.

How do you lowercase in Linux?

You can change the case of the string very easily by using tr command. To define uppercase, you can use [:upper:] or [A-Z] and to define lowercase you can define [:lower:] or [a-z]. The `tr` command can be used in the following way to convert any string from uppercase to lowercase.


1 Answers

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.)

like image 114
Keith Thompson Avatar answered Nov 06 '22 10:11

Keith Thompson