Linux commands (LS, cd,pwd)

Source: Internet
Author: User

1,ls CommandLS used to print out the current directory of the list ls-l/-h/-a-h humanized display-A with hidden files are shown in the-F executable special display band *

[[email protected] test4]$ lsfile file1 folder folder2 folder3[[email protected] test4]$ touch. Haha[[email Protected] test4]$ lsfile file1 folder Folder2 Folder3
[Email protected] test4]$ ls-a
.  .. File file1 folder Folder2 Folder3. Haha[[email protected] test4]$ ls-lhtotal 12K-rw-r--r--1Ligang trainning0Mar8 to: -file-rw-r--r--1Ligang trainning0Mar8 to: inFILE1DRWXR-xr-x2Ligang trainning4.0K Mar8 to: inFOLDERDRWXR-xr-x2Ligang trainning4.0K Mar8 to: -FOLDER2DRWXR-xr-x2Ligang trainning4.0K Mar8 to: infolder3[[email protected] test4]$ ls-Latotal -drwxr-xr-x5Ligang trainning4096Mar8 .: ,. drwx------ theLigang trainning4096Mar8 Geneva: A ..-rw-r--r--1Ligang trainning0Mar8 to: -file-rw-r--r--1Ligang trainning0Mar8 to: inFILE1DRWXR-xr-x2Ligang trainning4096Mar8 to: inFOLDERDRWXR-xr-x2Ligang trainning4096Mar8 to: -FOLDER2DRWXR-xr-x2Ligang trainning4096Mar8 to: inFolder3-rw-r--r--1Ligang trainning0Mar8 .: ,. Haha[[email protected] test4]$ ls-lahtotal 20Kdrwxr-xr-x5Ligang trainning4.0K Mar8 .: ,. drwx------ theLigang trainning4.0K Mar8 Geneva: A ..-rw-r--r--1Ligang trainning0Mar8 to: -file-rw-r--r--1Ligang trainning0Mar8 to: inFILE1DRWXR-xr-x2Ligang trainning4.0K Mar8 to: inFOLDERDRWXR-xr-x2Ligang trainning4.0K Mar8 to: -FOLDER2DRWXR-xr-x2Ligang trainning4.0K Mar8 to: inFolder3-rw-r--r--1Ligang trainning0Mar8 .: ,. haha

2,dir switch current directory to DirnamE

cd/cd~ back to User home directory CD/Enter system root CD-return to the directory before entering this directory
[[Email protected] test4]$ CD//~]$ [[email protected] soft]# pwd/opt/-/~ ]# pwd/~]# CD-/opt/soft[[email protected] soft]#
3,pwd pwdcommand to view the full path of the current working directoryPWD shows the connection path pwd-p shows the actual path/bin/pwd option
[[email protected] init.d]$ pwd/etc//bin/pwd/etc/rc.d/init.d[[email protected] init.d]$ pwd/etc/-L/etc/-P/ETC/RC.D/INIT.D

Linux commands (LS, cd,pwd)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.