- Learn Linux Quickly
- Ahmed AlKabary
- 125字
- 2021-06-11 18:43:49
Hiding files
You can hide any file by renaming it to a name that starts with a dot.
Let's try it; you can hide the file dogs.txt by renaming it to .dogs.txt as follows:
elliot@ubuntu-linux:~$ ls
apple.txt banana.txt carrot.txt dogs.txt Desktop dir1 small
elliot@ubuntu-linux:~$ mv dogs.txt .dogs.txt
elliot@ubuntu-linux:~$ ls
apple.txt banana.txt carrot.txt Desktop dir1 small
elliot@ubuntu-linux:~$
As you can see, the file dogs.txt is now hidden as it got renamed to .dogs.txt. You can unhide .dogs.txt by renaming it and removing the leading dot from the filename:
elliot@ubuntu-linux:~$ mv .dogs.txt dogs.txt
elliot@ubuntu-linux:~$ ls
apple.txt banana.txt carrot.txt dogs.txt Desktop dir1 small
elliot@ubuntu-linux:~$
Yes, Sir! You can also hide and unhide directories in the same manner. I will leave that for you to do as an exercise.
推薦閱讀
- PWA入門與實踐
- Git Version Control Cookbook
- Learning RabbitMQ
- Oracle數據庫從入門到運維實戰
- Java Web應用開發技術與案例教程(第2版)
- Building a Recommendation Engine with Scala
- Python面向對象編程:構建游戲和GUI
- Oracle從入門到精通(第5版)
- AppInventor實踐教程:Android智能應用開發前傳
- Learning Unity 2D Game Development by Example
- HTML 5與CSS 3權威指南(第3版·上冊)
- Struts 2.x權威指南
- Unity 5.X從入門到精通
- Mastering Concurrency in Python
- JavaScript Unit Testing