FreeKB - Linux FIND command - Display hidden files
Linux Commands - Linux FIND command - Display hidden files

If you are not familiar with the find command, check out our Getting Started article.

Let's say /tmp/example contains a hidden directory, like this.

/tmp/example/.hidden_directory

 

The following command can be used to return file and directory, including hidden directories.

find /tmp/example -name "*"

 

The following should be displayed. In this scenario, both the parent directory (/tmp/example) and everything within the parent directory will be returned.

/tmp/example
/tmp/example/.hidden_directory

 

The following command can be used to only display hidden directories.

find /tmp/example -name ".*"

 

The following should be displayed. In this scenario, files and directories beginning with a period followed by anything will be returned.

/tmp/example/.hidden_directory


Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter a95a8 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |