Monday, May 6, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 11300  / 2 Years ago, wed, march 16, 2022, 8:36:21

When I type ll or ls to list the contents of a directory...



The ls command shows un-hidden files and folders in a horizontal view.

To show the hidden folders, I have to type ls -a. I like how this works.



The ll command shows all files and folders, including hidden ones without needing to add -a.



I would like ll to list only unhidden files and folders by default. And if I want to show the hidden ones, I'd like to have to type ll -a. How can I set this up?


More From » command-line

 Answers
7

Open the file .bashrc in your home directory. The should be an entry which looks like:



alias ll='ls -la'


Remove the last a, save the file and open a new shell. Now ll should work as want you. If you do not find the line, you can add it to your .bashrc:



alias ll='ls -l'

[#34546] Thursday, March 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
attagjump

Total Points: 272
Total Questions: 127
Total Answers: 124

Location: Taiwan
Member since Fri, Sep 17, 2021
3 Years ago
;