search

Loading
Showing posts with label linux tips and tricks. Show all posts
Showing posts with label linux tips and tricks. Show all posts

Saturday, March 3, 2012

How to hide a file or folder in Linux

This is a basic question that arises in the mind of the most new linux users. This can be easily achieved in linux. Its a matter of just adding a do in front of the file/folder name in linux.

For example, to hide a file called 'linux-tips.txt', we just need to add a dot in front of it. It will be like this.

.linux-tips.txt

You can use the mv command to do it in command line. The above can be done like this:

mv linux-tips.txt .linux-tips.txt

Once we add the dot infront of it, it won't be visible in 'ls' command. You can view the hidden files by using 'ls -a' command.

The same method works for folders also.