whether a string is contained in all files in the Linux lookup directory
Look for any file in the directory that contains a string find. | Xargs Grep-ri "IBM"
Find out if any of the files in the directory contain a string, and only the file name is printed
Find. | Xargs Grep-ri "IBM"-l
Put the/home/users.dat file inside the:: Replace, then append to/home/tmp/users.dat
Cat/home/users.dat | Tr-s "::" ', ' >>/home/tmp/users.dat
LS Displays the files (clips) under the current path
-L Display detailed file (folder) information
-a displays hidden files (clips)
More split-screen view file content
Cat displays file contents all at once
TAC flashbacks all show file contents
CP Source Destination Replication folder from one place to another
When the destination does not exist, the destination name is the new file name
When the destination exists, the file is placed in the destination folder
MV Source destination Moving folders from one place to another; renaming
RmDir Delete an empty folder
RM Delete Files
-R Recursive Delete non-empty folder
-F Force Delete, do not prompt
Find. -name ABC finds files (folders) in the current directory named ABC
Number of lines, words, and words appearing in the WC statistics file
Hostname View or modify host name
If the requirement is permanent, you need to modify the configuration file/etc/sysconfig/network
Top shows all the processes
PS Displays the current process's
Ps-ef|grep MySQL to find specific processes
Kill-9 PID Kill Process
Du-h--max-depth=1. View the size of a file (folder) under the current directory
Df-h View disk space consumption
TAR-ZXVF hadoop-1.1.2.tar.gz Uncompressed file
Service iptables status|stop|start|restart firewall status, shutdown, open, reboot
Chkconfig iptables off automatic start of firewall
Service network restart used when IP is modified to reboot the NIC
> Redirect to a file, overwriting the original one at a time, and writing again
>> Redirect to a file, each append write
---------------------------------------------------------------------------------------------------
Configure the files for Global environment variables/etc/profile
Configure the file for the current user environment variable ~/.BASHRC
---------------------------------------------------------------------------------------------------
R Read W write x execute-no permissions
rw-r--r--
Creator Group Others
User group Other All
rw-r--r--
420 400 400
The default permission for a new file is 644
The default permission for the newly created folder is 755