Monday, April 29, 2024
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 24503  / 3 Years ago, tue, october 26, 2021, 5:51:05

When I enter command



ls


I see a list of files and directories in current directory, the list displayed is quite annoying.



Rather, I like to execute ls command with -1 option like



ls -1


My question is how to change default behavior of ls command such that it will always execute with -1 option. i.e how to display files and directories in one column with ls command.



Thanks.


More From » command-line

 Answers
3

One way would be by creating alias in your ~/.bashrc file:



alias l1='ls -1'



then by typing l1, ls -1 will be executed


[#40414] Wednesday, October 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
panshow

Total Points: 454
Total Questions: 98
Total Answers: 122

Location: Philippines
Member since Sat, Jul 11, 2020
4 Years ago
;