- 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.
推薦閱讀
- Deploying Node.js
- Java面向?qū)ο笏枷肱c程序設(shè)計(jì)
- Spring技術(shù)內(nèi)幕:深入解析Spring架構(gòu)與設(shè)計(jì)
- 程序員面試筆試寶典
- Instant Zepto.js
- YARN Essentials
- Unreal Engine 4 Shaders and Effects Cookbook
- 零基礎(chǔ)學(xué)單片機(jī)C語(yǔ)言程序設(shè)計(jì)
- Arduino計(jì)算機(jī)視覺編程
- Java Web應(yīng)用開發(fā)給力起飛
- 零基礎(chǔ)學(xué)HTML+CSS第2版
- C語(yǔ)言程序設(shè)計(jì)教程
- JavaScript Concurrency
- C語(yǔ)言編程魔法書:基于C11標(biāo)準(zhǔn)
- 微信公眾平臺(tái)服務(wù)號(hào)開發(fā):揭秘九大高級(jí)接口