ls command: List only hidden files in Unix / Linux terminal

ls command: List only hidden files in Unix / Linux terminal

Fig:01 ls command to view only hidden files

If you just want to list hidden files and don’t want to go through all the other normal files under Linux / Unix / *BSD/ Apple OS X terminal session try the following in your $HOME:


ls -l $HOME/.??*
ls -ld $HOME/.??*
ls -ld ~/.[^.]*

Examples and usage: Linux / Unix: Rsync Copy Hidden Dot Files and Directories Only

2 comment

    1. It Really works, but with ls .* you don’t ommit the parent and current directory. Take a look

      ls -ld .[^.]* -> list all files that begin with a “dot”, but don’t have a “dot” in your side

      all hidden dirs will be shown except :

      . > current directory
      .. > parent directory

      bye

Leave a Comment