hidden folder in linux

h3x

New Member
Joined
Mar 17, 2022
Messages
1
Reaction score
0
Credits
12
Hello everybody,
I'm new to linux and wonder about ls -a command. As a result we can see . .. and other files if included. If I use ls command I can't see . and ..
Are . and .. count as a hidden directory?
 


Hello @h3x,
Welcome to Linux.org Forum.
you can find out about the ls command by typing
Code:
ls --help
or
Code:
man ls
ls -a tells the command to list all files including the hidden files that start with a . such as . .cache
if you just type ls it ignores hidden files and folders.
Hope this helps.
 
Last edited:
Are . and .. count as a hidden directory?

The magic '.' only works at the beginning of a file.

.myfile is a hidden file
my.file is not hidden

directories are different.

. = my current directory

ls . is the same as ls (this directory)
.. means the next hugher up directory

so if I ..
cd /usr/local/bin
ls ..
that will give the files in local, even though my context is currently in bin.
cd ..
will put me back at /usr/local
cd ..
will put me back at /usr
 

Members online


Latest posts

Top