linux学习笔记(国外英文资料)
linux学习笔记(国外英文资料)
Lsb_release -a looks at the system name
Shutdown:
Shutdown -h now init 0
Before you switch off, it's best to synchronize sync memory data to disk
Find:
Find
Find / -name index.php -exec RM {} \; find and delete
Find / -name index.php -exec cat {} \; find and view
Find /media/ -name \*tree\* wildcard lookup
Find /var/www/html -type D -exec Chmod 0755 {}\; search directory and modify permissions
Ls -a view all files
View file size:
Ls -lh view file size, with KB display
Du -ah looks at each file size
Du -sh looks at the entire folder (including subfolders)
Du -shS looks at the entire folder (without subfolders)
Which find files
View partition:
DF
DF -h
Fdisk -l looks at the hard disk partition structure
Fdisk -l /dev/sdc
Fdisk /dev/sdb to the SDB partition
M helps n add a new partition
P creates the primary partition
Default start position
End position +4G
P print partition table
W writes the partition table to disk
Format partition:
Mkfs -t ext4 /dev/sdb1
Mkfs -t VFAT /dev/sdc1
Disk mount:
Mount
Mount, -t, VFAT, /dev/sdc1, /mnt/usb/ are mounted in FAT32 format
MKDIR /mnt/sdb/sdb1 creates a mount directory
Mount /dev/sdb1 /mnt/sdb1
E2label /dev/sdb1 web to sdb1 plus web disk label
Lsof /mnt/sdb1 looks at sdb1, who is using it?
Umount /dev/sdb1 cancels mount
Mount -L'web'/web with label mount
VIM /etc/fstab auto mount settings
LABEL= label
Vgchange -ay vg_wangxin activates volume groups
Mount /dev/mapper/vg_wangxin-lv_home /home mount
Mount the root partition, mount, -n, remount, -o, RW /
Enter the single user mode, restart any key, edit e second e spaces, single, and then enter B to restart
Mount -a detects whether mount mount has problems
Chmod change file permissions
MKDIR create folder
Recursive creation of MKDIR -p /text/a/php
Touch create files
Chgrp HD a.php changes the file's user group to HD
Chgrp gf:gf a.php changes the owner of the file: the user group
Compress:
Zip file name compression object
Zip passwd.zip passwd
Unzip passwd.zip decompr