++++++++++++++++++++++++++++++ File Search command +++++++++++++++++++++++++++++++19) file search:find syntax: Find [Search Range] [Match criteria] options:-name (search by file name) -iname (case insensitive) -size (find \+n-n n based on file size) &NBS P -user (Search by Owner) -cmin (find based on file property modification time)-mmin (find based on file content modification time) & nbsp -amin (search based on recent visits) connectors:-A (two conditions at the same time),-o two conditions satisfy any one & nbsp -type (Find by file type: F file d directory l soft link)    -EXEC/-OK command {} \;(perform actions on search results) & nbsp -inum (Search by I node) NOTE: wildcard *, single character match? 1 blocks = 512 bytes =0.5k 20) find files in the file repository: Locate (FAST) Options:-I ( Case-insensitive) NOTE: updatedb (update file repository, TMP directory below file is not included in file repository) 21) Search Command directory and alias Information: which 22) Search command directory and help document path: whereis 23) searches the file for string matching lines and outputs options:-I (Not missingCASE) -V (exclude specified string) ++++++++++++++++++++++++++++++ file Search command +++++++++++++++++++++++++++++++ ++++ ++++++++++++++++++++++++++ help command +++++++++++++++++++++++++++++++24) get help info: Man [command or profile] NOTE: 1 Help for the command 5 means help for the configuration file Whatis View simple information about the command/apropos simple information about the configuration file   ; [command]--help View command options Help information 25) get help for Shell built-in commands:help Note: Built-in commands refer to commands in the kernel, which are commands that do not have an absolute path. ++++++++++++++++++++++++++++++ help Command +++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ User Management command +++++++++++++++++++++++++++++++26) add user name:useradd NOTE: Execute permissions--root 27) Change Password: passwd (to follow password rules) 28) View login user Information:who NOTE: tty-local terminal pts-Remote terminal 29) view logged in User details: W ( Show information more detailed than WHO) 30 See how long a user has logged in: uptime++++++++++++++++++++++++++++++ User management Commands +++++++++++++++ ++++++++++++++++ ++++++++++++++++++++++++++++++ Compression Decompression Command +++++++++++++++++++++++++++++++31) Compressed Files: gzip (only compress files, cannot compress folders) --suffix. gz 32) Extract files: gunzip 33) package directory:tar options:-C ( Package) -V (Show details) -F (Specify file name) -Z (decompression) -X (unpacking) 34) compress files or directories: Zip (after compression, protect source files) options:-R compression directory 35) Extract files or directories: unzip 36) Compressed files: bzip2 (similar to gzip) option:-K ( Preserve source files after compression) Directory Compression example: TAR-CJF temp.tar.bz2 temp 37) Extract files:bunzip2 Directory Decompression Example: TAR-XJF temp.tar.bz2++++++++++++++++++++++++++++++ compression decompression command +++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ Network command +++++++++++++++++++++++++++++++38) send messages to the user to Ctrl+d end:write Syntax: write [user] 39] Send broadcast message: wall (send information to all current online users) Syntax: wall [information] 40] Test network connectivity:ping & nbsp Syntax: ping [options] [ip] options:-C (number of pings) 41) view and set network card information:ifconfig syntax: ifconfig [ Nic name][ip] 42) view Send e-mail:mail syntax: Mail [user name] Note: q--exit h--list numbers--the first few letters 43) view current and past logged-in User information: last 44) View last login information for a specific user: lastlog& nbsp Example: lastlog-u [user's uid] 45] shows the path between packets to the host: traceroute 46) displays network-related information:netstat Options:-T (TCP protocol) -U (UDP protocol) -L (listener) -R (routing) -N (show IP address and port number) & nbsp; Note: Netstat-tlun View native listening ports netstat-an View all network information in this machine  NETSTAT-RN View native routing table (Gateway) 47) Configure the network:setup NOTE: After the configuration is ready to restart the network service will not take effect-- Service network restart 48) Mount command: Mount/umount (uninstall) Syntax: Mount [-t file system] device file name mount point +++++++++++++++++ +++++++++++++ Network Command +++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ power off restart command ++++++++++++++ +++++++++++++++++49) shutdown restart:shutdown options:-H (shutdown) -R (restart) -C (Cancel previous shutdown command) & nbsp Example: shutdown-h/r now\ shutdown-h/r 20: 20 50) Other shutdown commands halt poweroff / init 0 &nbs P Other restart commands reboot / init 6 system runlevel: (init)
0 Shutdown 1 Single User 2 not fully multiuser, without NFS service 3 full multiuser 4 Unassigned 5 Image interface 6 restart 51) View System RunLevel: RunLevel (can also see last run level) 52) Exit Login command : logout++++++++++++++++++++++++++++++ Power off restart command +++++++++++++++++++++++++++++++
Linux Learning Notes-common commands (ii)