Linux Learning Note One

Source: Internet
Author: User
Tags create directory


(((((() ((() ((() ((() (())))))))))))))


One ************************linux root directory each file *******************************************

/bin # #二进制binary可执行文件也就是系统命令 (store frequently used commands, which let the computer perform tasks)
/sbin # #系统管理命令存放位置 (commands to be used with certain permissions)
/Boot # #启动分区, responsible for system boot (store boot-related files)
/dev # #设备管理文件, a device driver that users access to external devices through these files. (for example, by/dev/mouse to access the mouse input)
/etc # #大多数系统管理文件 (store configuration related files, including user information file/etc/passwd, System initialization file/ETC/RC, etc.)
/Home # #普通用户的家目录 (for general user-related files)
/lib # #32位系统库文件存放位置 (Standard programming library, also called dynamic Link shared library)
/lib/modules # #包含系统核心可加载各种模块, especially those needed to reboot the system when recovering a damaged system (for example, network and file system drivers)
/LIB64 # #64位系统库文件存放位置
/media # #系统临时设备挂载点
/MNT # #系统临时设备挂载点 (default mount directory for floppy drive and optical drive)
/run # #系统临时设备挂载点
/OPT # #第三方软件安装位置
/proc # #系统信息
/root # #超级用户家目录 (store root user-related files)
/srv,/var # #系统数据 (storing frequently changing data)
/sys # #系统管理, mostly about the kernel
/tmp # #系统临时文件存放位置 (public)
/usr # #系统用户相关信息数据及用户自定义软件存放位置 (the directory where the default installation files reside)
-****************************************888888*****************************************

--------------------------------------------Absolute and relative paths----------------------------
[Email protected]/]# cd/etc/udev/# #绝对路径
[[email protected] udev]# ls
Hwdb.bin RULES.D udev.conf
[Email protected] udev]# CD rules.d/# #相对路径
[Email protected] rules.d]# pwd
/etc/udev/rules.d
[Email protected] rules.d]# CD/ETC/UDEV/RULES.D # #绝对路径

Summary:--------Absolute path
File in the real location of the system, the file name begins with "/"
-----------Relative path
The file relative to the current location of the name of a shorthand, the name does not start with/, and the name will automatically add the value of the PWD display
----------------------------------------------End----------------------------------------------

---------------------------------------commands related to viewing files------------------------------------

1 pwd # #显示当前所在位置
2 CD
---chage directory # #进入目标目录中
cd~ # #回到当前用户家目录
Cd~username # #进入到指定用户家目录
CD: # #进入当前目录的上一级
cd-# #进入之前所在系统目录 (that is, the last directory in which it was located)
3 Touch # #新建文件
-----------------------------------------------------------------------------------------------------
Practice A
[Email protected] bus]# CD. # #Linux中cd: To space between
BASH:CD: Command not found ...
[Email protected] bus]# CD. # #正确写法
[Email protected] sys]# cd/home/student/desktop/
[Email protected] desktop]# CD-# #返回上一次所在目录
/sys
[Email protected] sys]# CD-
/home/student/desktop
[Email protected] desktop]# CD. # #返回上级目录
[Email protected] student]# PWD # #当前位置
/home/student
[Email protected] student]# CD.
[Email protected] home]# pwd
/home
[Email protected] home]# CD ~ # #返回根目录
[Email protected] ~]# pwd
/root
Practice II
[Email protected] home]# mkdir qq/qq1
Mkdir:cannot Create directory ' qq/qq1 ': No such file or directory
[Email protected] home]# mkdir-p qq/qq1
[Email protected] home]# CD qq/
[[email protected] qq]# mkdir WW RR PPP # #建三个目录
[[email protected] qq]# ls
PPP QQ1 RR WW
[Email protected] qq]# mkdir-p QQ
[Email protected] qq]# pwd
/home/qq
[[email protected] qq]# mkdir qq{1..10}
Mkdir:cannot Create directory ' qq1 ': File exists
[[email protected] qq]# ls
PPP QQ QQ1 qq10 qq2 qq3 qq4 qq5 qq6 qq7 qq8 qq9 RR ww


------------------------------------------End----------------------------------------------------

-----------------------------------------------the list command----------------------------------------
[[email protected] desktop]$ ls--help
Usage: LS [option] ... [File] ...
List
-A,--all lists all
-H,--human-readable with-l output file size in an easy-to-read format (e.g. 1K 234M 2G)
-l list file attributes in longer format
-R,--recursive recursively display subdirectories
-S,--size displays the size of each file in blocks
-d Specifies the directory itself

-----------------------------------------------End----------------------------------------------

-----------------------------------------------the mkdir command-------------------------------------------

Usage: mkdir [options] ... Directory...
Make Directory # #建立目录
-P # #第归建立目录
--------------------------------------------------End--------------------------------------------


Linux Learning Note One

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.