关于linux:linux怎么取消文件隐藏命令Linux基础命令显示隐藏的文件

12次阅读

共计 2116 个字符,预计需要花费 6 分钟才能阅读完成。

零碎中一些文件,和 Windows 中的系统文件一样,这些文件个别是不显示进去的,那么咱们能够应用 - a 参数来显示暗藏的文件。如下所示:[root@Linux ~]# ls -a . .chewing .gconfd install.log .redhat .. .cshrc .gnome install.log.syslog .scim anaconda-ks.cf

零碎中一些文件,和 Windows 中的系统文件一样,这些文件个别是不显示进去的,那么咱们能够应用“-a”参数来显示暗藏的文件。如下所示:

[root@Linux ~]# ls -a

. .chewing .gconfd install.log .redhat

.. .cshrc .gnome install.log.syslog .scim

anaconda-ks.cfg Desktop .gnome2 .lesshst .tcshrc

.bash_history .dmrc .gnome2_private .metacity .thumbnails

.bash_logout .eggcups .gstreamer-0.10 .mozilla .Trash

.bash_profile .esd_auth .gtkrc-1.2-gnome2 .nautilus

.bashrc .gconf .ICEauthority .recently-used.xbel

看看这样显示的文件就比拟多了。能够发现,暗藏文件是以“.”结尾的文件。这些文件个别都有非凡的作用,如果显示进去,有可能被用户不小心删除。

咱们能够联合下面的两个参数来显示目录下的文件,如下所示:

[root@Linux ~]# ls -al

总计 212

drwxr-x— 18 root root 4096 03-19 05:30 .

drwxr-xr-x 24 root root 4096 03-19 12:21 ..

-rw——- 1 root root 865 03-15 04:12 anaconda-ks.cfg

-rw——- 1 root root 2372 03-19 05:52 .bash_history

-rw-r–r– 1 root root 24 2006-07-13 .bash_logout

-rw-r–r– 1 root root 191 2006-07-13 .bash_profile

-rw-r–r– 1 root root 176 2006-07-13 .bashrc

drwx—— 2 root root 4096 03-14 20:32 .chewing

-rw-r–r– 1 root root 100 2006-07-13 .cshrc

drwxr-xr-x 2 root root 4096 03-14 20:34 Desktop

-rw——- 1 root root 26 03-14 20:31 .dmrc

drwxr-x— 2 root root 4096 03-14 20:32 .eggcups

-rw——- 1 root root 16 03-19 05:30 .esd_auth

drwx—— 4 root root 4096 03-19 05:06 .gconf

drwx—— 2 root root 4096 03-19 05:30 .gconfd

drwxr-xr-x 3 root root 4096 03-14 20:32 .gnome

drwx—— 6 root root 4096 03-19 05:30 .gnome2

drwx—— 2 root root 4096 03-14 20:32 .gnome2_private

drwxr-xr-x 2 root root 4096 03-14 20:32 .gstreamer-0.10

-rw-r–r– 1 root root 81 03-14 20:32 .gtkrc-1.2-gnome2

-rw——- 1 root root 358 03-19 05:30 .ICEauthority

-rw-r–r– 1 root root 27964 03-15 04:12 install.log

-rw-r–r– 1 root root 5069 03-15 04:11 install.log.syslog

-rw——- 1 root root 35 03-19 05:26 .lesshst

drwx—— 3 root root 4096 03-14 20:32 .metacity

drwx—— 3 root root 4096 03-14 20:36 .mozilla

drwxr-xr-x 3 root root 4096 03-19 05:30 .nautilus

-rw-r–r– 1 root root 1528 03-19 05:30 .recently-used.xbel

drwxr-xr-x 3 root root 4096 03-14 20:32 .redhat

drwx—— 4 root root 4096 03-14 21:06 .scim

-rw-r–r– 1 root root 129 2006-07-13 .tcshrc

drwx—— 3 root root 4096 03-14 20:33 .thumbnails

drwx—— 2 root root 4096 03-14 20:32 .Trash

这样显示是不是感觉更好呢?
参考链接:
3 ways to show hidden files in Linux

正文完
 0