0

I need to display all hidden files in the current directory but I dont want to see hidden files in the parent directory. I used echo command for it but so far I cant get rid of hidden files in parent directory.

My code is: echo $(ls .* --ignore='*')

The output is:

.bash_history 
.bash_logout 
.bashrc .profile 
.: 
..: 
.cache: 
.config: 
.gnupg: 
.loc                           
al:
IlGala
  • 3,331
  • 4
  • 35
  • 49
Ekat Sim
  • 115
  • 6

1 Answers1

0

This lists only hidden files:

ls -d .?* 
mheyd
  • 1
  • 1