对于刚使用Linux系统的朋友来说,对于Linux的命令、终端呀什么的,都会不习惯,感觉不一样。这是怎么办呢!其实在网上有很多 的教程来帮助我们,这里整理了一点,更方便我们如何简单的学习和理解命令。使在Linux更容易使用。
这里注意:在Linux中,文件以“.”开头的就是隐藏文件,并且每个文件,文件夹,设备或者命令都是以文件对待。
ls -l 命令输出:
d (代表了是目录).
rwxr-xr-x 是文件或者目录对所属用户,同一组用户和其它用户的权限。
上面例子中第一个ravisaive 代表了文件文件属于用户ravisaive
上面例子中的第二个ravisaive代表了文件文件属于用户组ravisaive
4096 代表了文件大小为4096字节.
May 8 01:06 代表了文件最后一次修改的日期和时间.
最后面的就是文件/文件夹的名字
下面我们开始介绍命令:
1. ls命令
ls命令是列出目录内容(List Directory Contents)的意思。运行它就是列出文件夹里的内容,可能是文件也可能是文件夹。
root@tecmint:~# ls
Android-Games Music
Pictures Public
Desktop Tecmint.com
Documents TecMint-Sync
Downloads Templates
“ls -l”命令以详情模式(long listing fashion)列出文件夹的内容。
root@tecmint:~# ls -l
total 40588
drwxrwxr-x 2 ravisaive ravisaive 4096 May 8 01:06 Android Games
drwxr-xr-x 2 ravisaive ravisaive 4096 May 15 10:50 Desktop
drwxr-xr-x 2 ravisaive ravisaive 4096 May 16 16:45 Documents
drwxr-xr-x 6 ravisaive ravisaive 4096 May 16 14:34 Downloads
drwxr-xr-x 2 ravisaive ravisaive 4096 Apr 30 20:50 Music
drwxr-xr-x 2 ravisaive ravisaive 4096 May 9 17:54 Pictures
drwxrwxr-x 5 ravisaive ravisaive 4096 May 3 18:44 Tecmint.com
drwxr-xr-x 2 ravisaive ravisaive 4096 Apr 30 20:50 Templates
“ls -a”命令会列出文件夹里的所有内容,包括以”.”开头的隐藏文件。
root@tecmint:~# ls -a
. .gnupg .dbus .goutputstream-PI5VVW .mission-control
.mission-control
.adobe deja-dup .grsync .mozilla .themes
.gstreamer-0.10 .mtpaint .thumbnails .gtk-bookmarks .thunderbird
.HotShots .mysql_history .htaccess .apport-ignore.xml .ICEauthority
.profile .bash_history .icons .bash_logout .fbmessenger
.jedit .pulse .bashrc .liferea_1.8 .pulse-cookie
.Xauthority .gconf .local .Xauthority .HGHVWW .cache
.gftp .macromedia .remmina .cinnamon .gimp-2.8
.ssh .xsession-errors .compiz .gnome teamviewer_linux .deb
.xsession-errors.old .config .gnome2 .zoncolor
本文固定链接:http://www.iayuidc.com/395.html
未经允许不得转载:主机推荐 » 针对 Linux系统新手非常实用的小命令