Tuesday, 15 November 2016

Creating hidden files and unhide the hidden files

Creating hidden file

"." : This . dot symbol is used to make a file or directory as hidden.By using "." dot symbol start of the filename or directory we can make it hidden.
                                        Syntax:$cat>.<filename>          
                                                               or
                                                     $cat>.<directoryname>
Ex:
$cat>.Number_File
Hidden files will not display in the list of file and directory when you are using ls command.

mv :To unhide existing hidden files we use mv command.
                                        Syntax :$mv .<filename> <filename>
Here filename will be same.
Ex:
$mv .Number_File Number_File
Now,By using ls command we can see Number_File in file list.

mv :
To hide the existing unhidden files we use mv command.
                                           Syntax:$mv <filename> .<filename>
Here filename will be same.
Ex:
$mv locations .locations
Now,if we use ls command locations file will not display in file list.

Creating hidden directory
                                           Syntax:$mkdir .<directoryname>
Ex:
$mkdir .Sample
Here,hidden files or directory will not display in filelist.So,we can not see it by using ls command.

mv : To unhide directory.
                                         Syntax:$mv .<directoryname> <directoryname>
Here directoryname will be same.
Ex:
$mv .Sample Sample
Now,By using ls command we can see Sample in file list.


No comments:

Post a Comment