How do I display only hidden (dot) files names under Linux / UNIX / Apple OS X / *BSD family operating systems? You can view only hidden files or directories in the current directory, using ls command and shell patterns.

Bash list only hidden files

Use ls -a command to display all hidden dot files. The -a option do not hide entries starting with . in the current directory or given path. Type the following command:

You can create an alias and put into your ~/.bash_profile or ~/.bashrc file:$ vi ~/.bash_profile Append the following line:alias lh='ls -a | egrep "^\."' ORalias lh='ls -l .??*' alias lhd='ls -ld .??*' Save and close the file. Now you can use lh or lhd commands to display only hidden dot files under Unix like operating systems.$ lh OR$ lhd Sample outputs:

I have some files I hid using ‘chflags hidden MyHiddenFolder’. When using ‘ls -la’ the hidden files and folders show a @ symbol next to it. After doing some research I found out that is for signifying Extended Attributes.

When doing a ‘ls -@’ you can see that the files I changed with ‘chflags’ to hidden have a “com.apple.FinderInfo”. Do you know a way to ‘ls’ for files with Extended Attributes and more specifically just the ones that are hidden? Other files can have Extended Attributes and not be hidden.

Basically I wanted to clean up my Finder views by hiding files and folders I don’t use often and don’t want to see. However, I want to have a way to find all files/folders I have done that to so I have a way to go over which ones I have done that to.