In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1.pwd View current path
2.cd,cd..
3.ls,ll
4.cp a.txt b.txt replication
5.mv test test_20190323 renamed mv test_20190323 / fcy/a move, cut
6. Rm-rf log.txt.*
7.mkdir test
8.rmdir test1
9.tail-f catalina.out, tail-f log.txt read the log
10.cat/less/more catalina.out View Files
11.vi entityengine.xml view the file. If you don't have it, create a new one.
I enter the editor
Esc exits editing
/ name looks for name. If there are multiple values, press n to the next one.
: Q exit (no modification)
: q! Exit (have changes, but do not want to save)
: X save exit
Wq save exit
12.ps-ef | grep java,ps-ef | grep catalina, ps-ef | grep mysql
13.tar-zxvpf file.tar.gz unzips a gzip-compressed tar package and retains the original attributes
14.yum install xxx
15.hostname
16.whoami
17.clear
18.date
19.find / fcy/a-name b.txt find /-name java find-name mysql
20.ifconfig
21.kill-9 pid
22.rpm-ivh xxx.rpm
23.rz upload sz log.txt download
24.sh startup.sh
25.chmod 777 a.txt chmod a=rwx a.txt chmod a+rwx a.txt chmod-R 777 Linix/*
U indicates the owner of the file, g indicates the same group (group) as the owner of the file, o indicates other people, and an indicates all three.
+ means to increase permissions,-to cancel permissions, and = to set permissions uniquely.
R for readable, w for writable, x for executable
26.sed-I's a.txt JerryUniple G'Universe stands for replacement, replacing the jerry in the file with tom
Sed-I'2a this is third line' b.txt a stands for adding, followed by this is third line after the second line
27. & put it at the end of the command, which can be executed in the background, nohup sh start.sh > log.txt & tail-f a.txt &
Ctrl+z puts a command that is being executed in the foreground in the background and is paused and cannot be executed
28. > generate the content directly to the specified file, overwrite the content in the source file, and then view it with cat, more, and less
Append to the tail will not overwrite the original content in the file
29.jobs to view commands currently running in the background
Jobs-l displays the PID of all tasks
30.bg 1 (the job number of the process), the program paused in the background starts to run
Fg 1 (the job number of the process), which transfers the background process to the foreground to run
31.yum install unzip unzip wxengine.zip decompresses zip-r wxengine.zip wxengine package
32.df, df-h check disk space usage fdisk-l | grep Disk
33.du, du-sh * displays the disk usage space for each file and directory
34. TopJournal PS aux looks at the memory and cpu consumed by a process
34.free to check system memory usage or actual available memory with cat / proc/meminfo = free+buffer+cache
thirty-five。 Restart Tomcat:
Ps-ef | grep java or direct ps-ef | grep catalina
Kill-9 pid
Go to the bin directory and check the log while sh startup.sh & tail-f.. / logs/catalina.out starts
36.vi / etc/my.cnf mysql configuration file, which can set the maximum number of connections
Service mysqld status
Service mysqld stop
Service mysqld start
Service mysqld restart
37.vi / etc/httpd/conf/httpd.conf apache configuration file
The executable file is in / usr/sbin
Service httpd status
Service httpd stop
Service httpd start
Service httpd restart
thirty-seven。 Start mq. / activemq start
38.su switching users only switch root identities, but the Shell environment is still for ordinary users, and pwd, working directory is still for ordinary users.
Su-switch user user and Shell environment switch to root identity, pwd, working directory to root
PATH environment variable errors will not occur only if the Shell environment is switched.
thirty-nine。 The log is much more garbled, top can solve it, SecureCRTSecureFX_7.0.0.326 Chinese version, bug of the tool itself
forty。 After installing VMware Tools,tar and unzipping it, go to the directory of vmware-install.pl and execute sudo. / vmware-install.pl
41.crontab is similar to the scheduled tasks under windows. When the operating system is installed, this service tool is installed by default.
And the crond process is started automatically, and the crond process checks periodically every minute to see if there is a task to be executed, and if so, automatically executes the task
The crond service should be installed by default. If not, install: yum install crontabs first.
Service crond status View status
Service crond start Startup Service
Service crond stop shuts down the service
Service crond restart restart service
Crontab-u root-l View list
Crontab-u root-r deletion
Crontab-u root-e editing (vi operation)
For example:
* / bin/echo 'date' > / dev/console outputs date to the console every minute
* date > / dev/console output time per minute to the console
First column: minutes 0-59
Second column: 0-23 hours
The third column: day 1-31
Column 4: month 1-12
Fifth column: any integer between 0 and 7, with 0 or 7 representing Sunday
Column 6: commands to run
Command is executed every 1 minute
* command
Execute * / 5 * every five minutes
Executed in the 3rd and 15th minutes of each hour
3Jing 15 * command
Performed at the 3rd and 15th minutes from 8 a.m. to 11:00
3Jing 15 8-11 * command
Every two days from 8am to 11:00 in the 3rd and 15th minutes.
3 command 15 8-11 * / 2 * *
Every Monday at the 3rd and 15th minutes from 8am to 11:00
3 command 15 8-11 * * 1
Restart smb at 21:30 every night
30 21 * / etc/init.d/smb restart
Restart smb at 4: 45 on the 1st, 10th and 22nd of each month
45-4-1-10-10-22 * / etc/init.d/smb restart
Restart smb at 1:10 every Saturday and Sunday
10 1 * * 6 0 / etc/init.d/smb restart
Restart smb every 30 minutes between 18: 00 and 23: 00 every day
0pr 30 18-23 * / etc/init.d/smb restart
Pm restarts smb at 11:00 every Saturday night
0 23 * * 6 / etc/init.d/smb restart
Restart smb every hour
* * / 1 * / etc/init.d/smb restart
Restart smb every other hour between 11:00 and 7 a.m.
* 23-7bat 1 * / etc/init.d/smb restart
Restart smb on the 4th of each month and 11:00 from Monday to Wednesday
0 11 4 * mon-wed / etc/init.d/smb restart
Restart smb at 4: 00 on January 1st
0 4 1 jan * / etc/init.d/smb restart
Execute scripts in the / etc/cron.hourly directory every hour
01 * root run-parts / etc/cron.hourly
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.