10

In Ubuntu, when I am up in "/" folder I type:

sudo find . -name .erlang.cookie 

and the result is:

./var/lib/rabbitmq/.erlang.cookie 

Then, when I am on the folder /var/lib/rabbitmq and I type ls, I see one file named mnesia.

When I type the find command again, I see

./.erlang.cookie 

-- what does that mean?

2 Answers 2

24

In Unix, a filename beginning with a dot, like .erlang.cookie, is considered a hidden file and is not shown by bare ls. Type ls -a to also show hidden files.

From man ls:

 -a, --all do not ignore entries starting with . 

However, you can show a hidden file with ls if you specify the name:

$ ls .erlang.cookie .erlang.cookie 
1
  • 4
    Or ls -A if you don't want to show . and ... Having them displayed is generally only useful if you use ls -l. Commented Mar 9, 2014 at 14:00
6

In Unix, hidden files start with dot(.), so when you issue "ls" command it will not list them out. If you want to print hidden file with long listing format you can use following command,

$ls -la where, l - use a long listing format a- do not ignore entries starting with . 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.