Linux 9th Day
Time: 20180725
Batch Modify file name
Rename [option] Expression file ...
Rename '. txt '. Bac ' f*.txt can change the f*.txt file suffix to F*.bac
DD If=/dev/zero of=/root/bigfile bs=1m count=100 generate the specified file in the specified directory 100M
Delete large file mode
> filename can instantly free up disk space
Lsof list the files that the process opens
Shred overwrite file hidden content, can be overwritten multiple times
-F forcibly overwrite
-N Multiple overwrite (to prevent recovery of files)
-U deletes the specified file, overwrites the file multiple times, and deletes the file
Xargs is used to assign multiple parameters to a command so that it can execute normally, and adding too many parameters after the default system command will prompt an error
Xargs [OPTION] ... COMMAND
LN creates a hard or soft link
-S Create soft links
Hexdump displaying file contents in ASCII, decimal, hexadecimal, octal mode
-B Display file contents in octal
-C Displays the file contents in ASCII mode
-C Display file contents in 16 and ASCII mode
File Display Type
Set view or set shell variables or positional parameters
[+|-] C settings can overwrite file contents that already exist
TR Convert file characters
Tr ' A-Z ' A-Z ' means converting all lowercase characters to uppercase
-D deletes the specified character
-C Using a reverse reference
-S converts multiple consecutive specified characters to a single character
-T converts the specified character to another character, a bitwise conversion
Dos2unix convert Windows text to linux text, delete \ r
Unix2dos convert Linux files to Windows text, add \ r
SEQ Outputs a sequence
seq [OPTION] ... First INCREMENT Last
-S Specify delimiter
Tee reads from standard input and outputs to standard output and files simultaneously
-A overwrites the original file instead of the default when writing to the file
Mail receives or sends messages
Mail-s SendMail Root <<eof
-S Message header
Users and Groups
Pwunconv the encryption key in the shadow is placed in the/etc/passwd file
Pwconv Recovering Pwunconv Operations
CHFN Modifying the user name's comment information
tree view File Trees
passwd Modifying user passwords
Finger reading User's comment information
Soft links and Hard link differences
1. Soft link Delete the specified file when soft link is not available, hard link Delete any other one can still be used
2. Soft links can create a link to a folder, hard links can not
3. Soft links can be created across file systems, hard links can not
4. Hard links have the same inode number, soft links are not the same
Linux 9th Day Bash Basic command