Sharing Information
Sharing Information
Picture of the author
Pankaj PawarinLinux
17th Sept 24.07:00 Min.
https://sharinginfo.in/linux/command-to-list-hidden-directory-and-files-in-current-directory-linux-24.html

Command to List Hidden Directory And Files In Current Directory – linux

Command to List Hidden Directory And Files In Current Directory – linux
Photo by Simon Abrams on Unsplash

To list hidden files and directories in the current directory in most Unix-based systems (like Linux and macOS), you can use the following command in your terminal:

[root@example ~]# cd /var/www
[root@example /var/www]# ls -lap | grep -v / | egrep "^."

If you want to list only hidden directory/folder then run:

[root@example ~]# cd /var/www
[root@example /var/www]# ls -lap | egrep "^..*/$"

This option shows hidden files along with detailed information such as permissions, owner, file size, and modification date.

Sharing Info Cookie Consent

Our website uses cookies to improve your browsing experience and relevant content delivery. Before continuing to use our website, you agree & accept of our Cookie Policy & Privacy.