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.
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