Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(Linux) List only hidden files, and only the file name

In Linux, list only hidden files, and only the file name (no owner, perms, etc)

$ ls -1d1 .!(|.)

This was useful in the context of creating an exclude list for some rsync jobs, where I only wanted to capture things like .bashrc and .vimrc, but didn't care bout a lot of the other profile config in the backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment