Monday, June 17, 2019

Linux show hidden files only

There are a few ways can be used to accomplish this task. The first 2 commands produce almost similar output
echo .*
ls -d .*
If you prefer it in long listing format, use `-l`
ls -dl .*
 or
echo .* | tr ' ' '\n'

Examples:
c-kurity@Linux:~$ echo .* . .. .bash_aliases .bash_history .bash_logout .bashrc .cache .config c-kurity@Linux:~$
c-kurity@Linux:~$ ls -d .* . .bash_logout .. .bashrc .bash_aliases .cache .bash_history .config c-kurity@Linux:~$

Related post:

Related Posts with Thumbnails