Redhat Linux novice basic knowledge and command the next day

The next day beginner Linux

ls command

ls: lists the directory contents
ls -a view hidden files ... (to shadow hidden files beginning point, display the current directory and parent directory).
LS -A view hidden files do not include ....
LS View -r reverse directory
ls - l directory listed a long list of
hidden files in the home under the ls -a / home viewing roots.

cal View Calendar

cal 2019 show 2019 calendar
cal 06 2019 show in June 2019 calendar

Create an alias

Method one
alias qwer = 'ls' ls command to create an alias qwer
unalias qwer delete the alias
Method Two
vim /.bashrc
write
alias qwer = 'ls'
the Shift +;
WQ save and exit
source .bashrc file so that the entry into force
exit
sign in again

file type

There are seven Linux file types: regular files, directories, files, file character device, block device file, socket file, symbolic link, the pipeline file.

1. Ordinary file
Here Insert Picture Description
shown in FIG first 10 characters of the first character - such files as regular files. Such files typically used to create a number of related applications, such as image tools, documentation tools, filing tools
2. catalog file
Here Insert Picture Description
as shown in FIG first 10 characters of the first character d (directory), this file is a directory file
3. device file
3.1 character file device
Here Insert Picture Description
shown in FIG as c (character), such as a document file shown in FIG character device first 10 characters of the first character.
Character device file that is the sequence number of peripheral devices such as a keyboard, mouse or the like. Features of these devices is "one read," can not truncate the output.
3.2 device file
Here Insert Picture Description
as shown, the first ten characters of the first character b (block), a block device such as a document file
block device file: a bridge between user space and kernel space, by the file descriptor block device able to find a device driver in the kernel. Some data is stored, to provide a system random access peripheral devices.
4. Link File
Here Insert Picture Description
As shown, the first ten characters of a first l (link), this file is a symbolic link file
4.1 symbolic link (soft link) : is a file that points to the directory stored in a another local file (the original file). (Equivalent shortcut under Windows)
LN -s AA bb
original document file link
two files
4.2. Hard-linked files (the equivalent of a copy, should be connected to a number of times at least, on behalf of the original document itself)
LN AA bb
original file links file
is equivalent to a two file names

5.socket file
when we start the MySQL server will generate a file mysql.sock

6. Pipeline file
when we create a named pipe, displays the file properties for pre-r-r-, which begins with p open on the pipeline file

Wildcards and their meanings

Wildcard Meaning
* * represents any number of characters
? Represents any one character, at least one
[] represents any one group of characters matched
[abc] matches any a, b, c in a
[AF] matched to the f a range from any one character

fhs Filesystem Hierarchy Standard

							boot
							开机引导文件
							
							dev device设备
							作为访问外部设备文件的接口

							etc (editable text configuration)
							用来放置配置文件
							
							home
							普通用户家目录
							
							media  挂载点目录
							用于挂载多媒体目录
							自动挂载目录
							
							mnt  (mount)挂载点目录
							用于被系统管理员使用,手动挂载一些临时媒体设备的目录
							
							root  root的主目录
							
/根目录						bin
							主要用于具体应用
							
							sbin
							主要用于系统管理
							只能root用户使用
							
							srv(server)
							主要用于存储本机或本服务器提供的服务或数据
							
							var  存放可变文件的目录
							系统产生的不可自动销毁的缓冲文件、日志记录(包括:mail、数据库文件、日志文件)
							
							tmp(temp)
							保存在使用完毕后可随时销毁的缓存文件
							(有可能有系统或程序产生、也有可能是用户主动放入的临时数据、系统会自动清理)
							
							usr(Unix software resource )Unix软件资源
							是Unix操作系统软件资源所放置的目录,而不是用户数据,所有系统默认的软件都会放置在/usr
Released two original articles · won praise 0 · Views 82

Guess you like

Origin blog.csdn.net/qq_43710889/article/details/104106732