How to make files Hidden in Linux

How to make files Hidden in Linux

 
 

Linux provides us the functionality to hide the files for security as per user preference, users can easily hide files by using some simple command or even use GUI for simplifying user involvement. This can especially be helpful if you want to hide your files or directories without having to share your personal information with colleagues and friends. Here is a detailed tutorial users can follow to hide files in their system –

Hiding files – 

  • Create a new file using cat command or make a new directory using mkdir or choose any of your current directory or file-
  • Now add data to your file which is sensitive and you wouldn’t like anyone to access it –
  • Append a dot in front of file by renaming the file using mv(move) command –
  • Now you have successfully hidden your file –Empty-Window

 

View hidden files –

After you have hidden your file, you must also be able to retrieve your hidden file

  • Using ls -a find your hidden file, ls on the other hand doesn’t display hidden files
  • Use cat command to view contents(make sure you use dot operator)
  • Or rename the file back to visible –

Using GUI to hide/view files –

  • You can right click on the file and add a dot operator in the beginning of the file to hide your important file
  • You can later view this file using CTRL+H

A simple script to hide files –

If you feel remembering commands is not a thing for you then you can use this simple script to hide any file just by entering the file name –

echo "Enter the file name to be hidden"
read x
mv $x .$x
echo "File sucessfully hidden"

 

Previous Script to delete files in Linux
Next [FreeBSD] How to install ports collection manually in FreeBSD

About author

You might also like

Scripting 0 Comments

Script to Make an Instagram Bot to get Followers

Backstory: So last week during my internship one of the work assigned to me was to go and follow some random profiles on Instagram through the company’s page. You might wonder why

Scripting 0 Comments

Implementing SMTP Protocol in Python (Amazon Price Tracking bot)

In the last post I started working on a bot that would track live prices from the Amazon server and would send a mail to the user indicating the price

Scripting 0 Comments

Script to delete files in Linux

Linux is a powerful operating system, it consists of various tools which can be utilised by the user to achieve maximum efficiency in his/her work routine. Linux provides user with

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply