Common commands for file search in Linux and Common commands for linux
File SEARCH Command: find
1. Search by file name
1.1. Search for precise files
Find path-name file name
1.2. Search for a file whose file name contains a string.
Find path-name * file name *
1.3. Search for files prefixed with a string.
Find path-na
Linux Network-related commands and linux Network-related commands
Ifconfig
Ifconfig is the command to view the NIC in centos6. In centos7, you must install the net-tools package before using it?Nic configuration file:/etc/sysconfig/network-scripts/ifcfg-ens33?Command: ifconfig
[root@shuai-01 ~]# ifconfigens33: flags=4
Network command: Ping (Test network connectivity)Network command: Ifconfig (view and set network card information)Note: When viewing the NIC information, enter the Ifconfig command directly.Network command: Last (lists user information for current and past logged-in systems)Network command: traceroute (shows the path and information of the packet to the target host)Network command: Netstat (display network-related information)Network command: Setup (configure the Network for permanent entry)Note
Linux Common Command Encyclopedia 100:
1, echo "AA" "Test.txt and Echo" BB "" test.txt//"empty the original file, and the content written to the file," "Put the content to the end of the file
2. chmod go+w-r/home/zhangy//To add Write permissions to group users and other users
3, TAR-TZVF test.tar.gz//List of archived content
4, Du-ah//view file list size
5, Du-sh//View the total size of all files
6, Echo ' 1+2 ' |bc-l//mathematical operation
the default permissions that correspond to the defaults.[[email protected] ~]# umask-su=rwx,g=rx,o=rx[[email protected] ~]# mkdir/tmp/test[[email protected] ~]# ls-ld/tmp/tes Tdrwxr-xr-x. 2 root root 4096 January 8 00:32/tmp/test[[email protected] ~]#When creating a new file, the default is no execute permission for security purposes. For example, create a new Test1.txt file under the TMP directory with the following default permissions:[Email protected] ~]# touch/tmp/test1.txt[[email protect
Summary of Common commands in Linux and summary of linux commands
Service -- status-all [service status]
Service MySQL restart [restart database]
Pstree-a [show complete commands for each program]
Pstree-c [not applicable to exact representation]
Pstree-l [display tree char
your own user directory:On the target machine: CP tmpdir.sql.gz/home/makaidong/Then on this machine:scp-r [email protected]:/home/makaidong/\*.sql.gz.Note: \* escapeNohupNohup Hive--service hiveserver 2>1 Dos2unix windows-linux Shell Format conversionFind. -name "*.conf" | Xargs Dos2unixVar.sh wrote: year=2015Shell import Source introduces other shells#!/bin/bash#在其他目录: source./sh/var.sh #sh目录下 or source sh/var.shSOURCE var.shRm-rf./data.txtTouch Dat
#查看系统内核/Operating System/CPU Informationuname-a# return: Kernel name host name Linux kernel version kernel build date OS version CPU model hardware platform GNU/linux# Viewing the operating system versionHead-N1/etc/issue# View gcc or G++versionGCC-VG++ -v#c++more rigorous grammar rules; #编译阶段, G+ + will call GCC, which is equivalent for C + + code, but becausegcc comma
Common Linux commands (27th) and common linux commands
In linux, the df command is used to check the disk space usage of the file system of the linux server. You can use this command to obtain the space occupied by the hard disk a
Network Communication commands (relatively simple ):
1. write/usr/bin/write
Write [user name]
Used to send information to a user, provided that the user has logged on to the server host
Otherwise, there is no way to leave a message for him. Therefore, write is a real-time communication tool.
End the communication with Ctrl + D
E.g. write guest
2. wall [write all]/usr/bin/wall
Used to broadcast information to all users
Wall [message] [file name]
3. pin
Common commands in Linux and Common commands in linux
Including date and time, viewing hard disk information, shutdown and restart, output and view, archiving and compression, and searching.Date and Time
The operation here is equivalent to clicking the time in the lower right corner of windows to view the system date
Five linux search commands, five linux commandsFive SEARCH Command Learning
Explain the five linux search commands: locate, find, which, whereis, and grep.Locate
Explanation: From the man manual, we can see that the locate search is based on the file name, but only depends
Basic linux commands and basic linux commands
Shutdown-h now shut down immediately
Shutdown-r now restart the computer
Reboot now restarts the computer
Logout user logout
Vi editor usage:
1) vi file name
2) Enter I to enter the command mode]
3) Enter esc to Enter command mode]
4) input: [wq indicates exit and keep q! E
Commands for viewing hardware device information in linux and for viewing hardware commands in linux
Reprinted: http://blog.chinaunix.net/uid-26782198-id-3242120.html
# Uname-a # view kernel/operating system/CPU Information# Head-n 1/etc/issue # view the operating system version# Cat/proc/cpuinfo # view CPU Information
Summary of common linux commands and common linux commands
I. Summary of common linux commands
Cd: Open the Directory
Cd/home to the '/home' directory'
Cd .. back to the upper-level directory
Cd... returns the last two levels
Crontab for linux commands and crontab for linux commandsCron is a built-in service in Linux. Run the following commands to start, view, and disable the service.
Service cron start // start service cron stop // close service cron restart // restart service cron reload // rel
Details of Common commands on Linux servers and Common commands on linuxI. User
1. useradd is used to create an account.
Useradd newname // create newnamepasswd newname // set change the password. After entering this command, you will be prompted to enter the password
2. delete a user
userdel newname
3. Switch users
su - youruser
4. ssh remote login
ssh -l root
Linux-Common commands for daily system management and Common commands for linux1: W view the overall load of the system. You cannot view the specific load, such as memory or disk.23:25:20 up 13 min, 2 users, load average: 0.00, 0.01, 0.01User tty from login @ IDLE JCPU PCPU WHATFlex tty1-0.01 s 0.01 s-bashFlex pts/0 192.168.75.1 0.00 s 0.02 s 0.00 s tmuxThe first
the syntax in the following format:Traceroute website(9) NetstatThe netstat command is used to display network-related information , where the path is/bin/netstat, with the syntax in the following format:netstat [options]where the-t option represents the TCP protocol, the-U option represents the UDP protocol,-L for listening,-R for routing, and-n for displaying the IP address and port number .such as: view the local listening port-----netstat-tlunView all network connections on this computer---
Accumulate common linux commands and common linux commandsAccumulate common linux commands
Record problems encountered in daily life:
Linux files contain ^ M The shell command tr can be used for removal. The specific command is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.