How to hide files in Bash?

QuestionsQuestions8 SkillsProBasic Files OperationsOct, 01 2025
090

To hide files in Bash, you can rename the file to start with a dot (.). Files that begin with a dot are considered hidden in Unix-like operating systems.

Example:

To hide a file named example.txt, you can rename it like this:

mv example.txt .example.txt

Note:

  • After renaming, the file .example.txt will not be visible in the standard file listing unless you use ls -a or ls -A to show hidden files.

If you have any further questions or need additional explanations, feel free to ask!

0 Comments

no data
Be the first to share your comment!