Sunday, April 28, 2024
292
rated 0 times [  292] [ 0]  / answers: 1 / hits: 830826  / 1 Year ago, sat, april 15, 2023, 3:40:45

I have a directory that contains thousands of files, some of them are hidden.



The command ls -a list all files, including hidden ones, but I need just to list hidden files.



What command should I use?


More From » command-line

 Answers
3

The command :



ls -ld .?* 


Will only list hidden files .



Explain :



 -l     use a long listing format

-d, --directory
list directory entries instead of contents, and do not derefer‐
ence symbolic links

.?* will only state hidden files

[#25138] Sunday, April 16, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oatglori

Total Points: 313
Total Questions: 102
Total Answers: 111

Location: Guam
Member since Thu, May 18, 2023
1 Year ago
oatglori questions
;