Open In App

How to Hide files using Command-line Interface?

Last Updated : 08 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

If you're looking to hide files using the command line, it's a quick and efficient way to protect sensitive data on your system. Whether on Windows, macOS, or Linux, you can use the command line to hide files or folders with just a few simple commands. This guide will help you understand how to hide files in Windows CLI, as well as on Linux and macOS, by using file-hiding commands. Learn how to utilize the CLI to hide files and safeguard your data effectively.

How to Hide Files using CLI?

Here, we will make step-by-step guidelines that should be followed for how to hide files using CLI.

Step 1: Open the Command prompt

Hide-file-using-CLI---CMD

Step 2: Navigate to the files that you want to hide and type the following command:

cd c:\Users\adimn\Desktop\Files

Note: You can find the file's location by finding it in your File Explorer, right-clicking it, then clicking Properties > >Location.

Hide-files-using-CLI---01-(1)

Step 3: Now type the following command and press enter on your keyboard.

attrib +h "Secret Files"
Hide-files-using-CLI---03-(1)

Change the secret file with the name you want to hide. If there is space in the name of your files then quotation marks will have to be given.

Points to be Noted

  1. If you want to hide everything including folders and files, use the attribute +h /s /d command.
  2. To show the file again, use the attribute -h "Secret Files" and then replace the word "secret file" in the name of your file. To show the entire folder, write the command "attrib -h /s /d" and enter.
How-to-Hide-files-using-Command-line-Interface
Hide files using Command-line Interface

Conclusion

Hiding files using the command line interface is a practical method for keeping your data private and secure. Whether you're on Windows, macOS, or Linux, knowing the right command line commands to keep files hidden can simplify the process. By mastering the techniques to hide files using the command line, you'll be able to manage your data discreetly and protect it from unauthorized access.

Also Read


Next Article
Article Tags :

Similar Reads