Linux file system:
1, the name of the file name strictly case sensitive characters
2, files can be used in addition to / any character other than
3, the file name length can not exceed 255 characters
4, to the beginning of the file as a hidden file.
: Current directory
..: a current directory on the
common commands:
pwd: Printing working directory
display the current directory
cd: change directory change the working directory
cd [/ the PATH / the tO / somedir]
cd: switching home directory
Note: bash, the home directory represents ~
cd ~: switch back to their home directory
cd ~ USERNAME: switch to specify the user's home directory
cd -: one located on the switch back and forth between the directory and the current directory
cd ../: switch to previous level directory
$ PWD: current work Catalog
$ OLDPWD: on a working directory
ls: list list the contents of the specified directory
LS [the OPTION] ... [the FILE] ...
-a: show all files, including hidden files
-A: and show all files except the ...
-l: --long, long list format, i.e., display detailed attribute information of the file
drwxr XR-2 X-12 is the root Jan 12:23 Anaconda 176 the root.
D: indicates the file type, there -, d, b, c, l, s, P
rwxr-XR-X
rwx: file owner rights owners
RX: file permissions genus groups
for other users (non-owner, is a group): RX
:. hidden permissions
2: the number of digital representation file is hard-linked
root : main document
root: file is a group
176: file size in bytes
Jan 12 12:23: file was last modified time
anaconda: file name
-h: - human-readable, file size unit conversion after conversion results may be inexact value
-d: Properties View directory itself, rather than file attributes inside
-r: reverse, reverse display
-R: recursive, recursive display
cat: concatenate
file text viewer
CAT [the OPTION] ... [the fILE] ...
-n, --number, Number All Output Lines, to the text line number displayed
-E, --show-ends, display linefeed $
tac: CONCATENATE and Print files in reverse
reverse view text files
tac [OPTION] ... [fILE] ...
file: the Determine file of the type view the contents of the file type
File [FILE] ...
echo: A Line Run the display of text, echo
echo [SHORT-OPTION] ... [STRING] ...
-n: not wrap
-e: let escape into force
\ n: line feed
\ T: tab
STRING quotes may be used single or double quotes may be used
in single quotes: strong references, variable reference replacement is not carried
~] # echo '$ SHELL'
double quotes: weak reference variable reference will be replaced
~] # echo "$ SHELL"
Note: regular variable reference symbol
$ {name}
shutdown or restart command: the shutdown
the shutdown [the OPTIONS ...] [the TIME] [WALL ...]
the OPTIONS:
-H: HALT
-R & lt: reboot
-C: Cancel
the TIME:
now
HH: mm
+ m
WALL: A Send Message to Everybody apos Terminal
Date Related command:
the Linux: read the date and time information from the hardware system startup, after completion of reading , it is no longer associated with the hardware
system clock
hardware clock
date
display system date time: date [the OPTION] ... [+ the FORMAT]
~] + #% F. date display date
2019-01-15
~] # date + % T displays the current time
11:07:27
Predetermined ~] # date + "% F % T" format check the time, + can appear only once, if the intermediate spaces, can be used "" enclosed, so that the space to be construed as meaning other
2019-01-1511: 08:05
~] # dATE S +% from at 0:00 on 1970 assigned time now
1547522443
set the system date and time: dATE [MMDDhhmm [[the CC] YY]] [SS.]
Clock, hwclock: display hardware settings or clock
-s, --hctosys, the clock of the hardware, the system is adjusted with the same hardware clock
-w, --systohc, subject to the system clock, the hardware is adjusted to the same system clock
cal: calendar
cal [[month ] year]
Linux system components and command help get 4
Guess you like
Origin www.cnblogs.com/jianchen013/p/11751563.html
Recommended
Ranking