Step by step example to make/create hidden directory in Fedora using Linux mkdir command.


Step by step example to make/create hidden directory in Fedora using Linux mkdir command.


Make and using hidden directory with mkdir command on Linux Fedora Core operating system. The hidden directory or file in Linux system begin with '.' (dot) in front of their filename. The example below show step by step process of creating hidden directory in Linux Fedora Core system.

1. Create directory called 'folder' and change to that directory.

[root@fedoracore ~]# mkdir folder
[root@fedoracore folder]#

[root@fedoracore ~]# cd folder/
[root@fedoracore folder]#

2. Issue ls command to see what in the directory that newly created.

[root@fedoracore folder]# ls -a
. ..
[root@fedoracore folder]#

[root@fedoracore folder]# ls -al
total 12
drwxr-xr-x 2 root root 4096 Jun 19 05:53 .
drwxr-x--- 40 root root 4096 Jun 19 05:53 ..
[root@fedoracore folder]#

Note: From the ls command output above, we know that even empty directory have two hidden directory in it, the '.' and '..'directory. The singe dot '.' represent current directory, and double dot '..' represent upper current directory.

3. Now lets begin with creating the hidden directory. Our first hidden directory called 'hidden_directory'. But as we know that hidden directory must begin with '.' dot infront of their filename, so the 'hidden_dectory' become '.Hidden_directory'.

[root@fedoracore folder]# mkdir .hidden_directory
[root@fedoracore folder]#

3a. Verify the creation of hidden directory with ls command.

[root@fedoracore folder]# ls
[root@fedoracore folder]#

3b. Execute the ls command again but now with -a and -al to verify the creation of our first hidden directory.

[root@fedoracore folder]# ls -a
. .. .hidden_directory
[root@fedoracore folder]#

[root@fedoracore folder]# ls -al
total 16
drwxr-xr-x 3 root root 4096 Jun 19 05:55 .
drwxr-x--- 40 root root 4096 Jun 19 05:53 ..
drwxr-xr-x 2 root root 4096 Jun 19 05:55 .hidden_directory
[root@fedoracore folder]#