Linux Command - File Handling

File naming rules

In addition / addition, all characters are legitimate
and some not the best characters such as spaces, tabs, backspace and character @ # ¥ & () - and so
avoid using ordinary as the first character of the file name. . represents the beginning of hidden files
case sensitive

Command Format

Command - option argument
ls -la / etc
when multiple options, you can write with
the current directory.
... parent directory of the current directory

View card information

ifconfig
eth0 (ethernet): first NIC
lo: virtual network card, and this communication

Temporary change ip address

ifconfig eth0 new ip address

File processing command

bin-binary binary, all users can perform
usr-the User
sbin Super binary-only root can execute

Command name: ls
command English original intent: list
command the path: / bin / ls
execute permissions: All users
Description: display directory file
syntax: ls option [-ald] [file or directory]
-a show all files, including hidden files
-l displays detailed information
-d directory attributes View

 drwxr-xr-x  2 root(所有者) root(所属组) 4496(文件大小) 12-01(创建或最后修改时间) asa(文件名称)

File Type
d directory
- binary file
l soft link file
permissions
r-read read
w-write write
x-execute execute
owner-owned group of other people
Ugo
the User Group Others
of 2-hard links
command name: cd
command English original intent: change directory
command the path: shell built-in commands
execute permissions: All users
description: Change directory
syntax: cd [directory]
command name: pwd
command English original intent: print working directory
command the path: / bin / pwd
execute permissions: All users
description: View current directory
syntax: pwd
command name: touch
path which the command: / bin / touch
execute permissions: All users
description: create the file
syntax: touch [filename]
command name: mkdir
command English original intent: make directory
command the path: / bin / mkdir
execute permissions: All users
description: create a directory
Syntax: mkdir [directory name]
command name: cp
command English original intent: copy
command the path: / bin / cp
execute permissions: All users
Description: Copy files or directories
Syntax: cp -R [source file or directory] [destination directory ]
-R & lt copy directory
-p constant time value
command name: mv
command English intended: move
command the path: / bin / mv
execute permissions: All users
function description: move or rename
syntax: mv [source file or directory] [ destination directory]
command name: rm
command English original intent: remove
command the path: / bin / rm
execute permissions: All users
description: delete
syntax: rm -rf [file or directory]
-r delete a directory
-f not confirm, delete
command name: cat
command English original intent: concatenate and display files
command the path: / bin / cat
execute permissions: All users
description: View file
syntax: cat [filename]
command name: more
path which the command: / bin / more
execution permissions: All users
description: View files
Syntax: more [filename]
box to display the next or f
Enter the next line
q or Q to exit
Command name: head
path where the command: / bin / head
execute permissions: All users
Description: see the first few lines of the file
syntax: head -num [filename]
front row num -num display the file
name of the command: tail
where the path to the command: / bin / tail
execute permissions: All users
description: View the file after a few lines of
syntax: tail-num [filename]
-num num lines before displaying the file
-f dynamic display of
command name: ln
path where the command: / bin / ln
execute permissions: All users
description: create a connection file
syntax: ln-s [source] [link file]
-s create a soft link
-i View node
soft link file permissions lrwxrwxrwx, just connect a
hard link is similar to copy, synchronous update, the change is also a change in the other, have the same i-node can not be generated across partitions

Guess you like

Origin blog.csdn.net/weixin_41998682/article/details/89556996