Easily use the "Explain Shell" script to understand Shell commands
When we work on Linux, everyone will find the help information of shell commands. Although built-in help such as man pages And whatis commands are helpful, the out
family within a table:#hbase> major_compact ‘t1‘, ‘c1‘
Configuration Management and node restart1) Modify the HDFs configurationHDFs Configuration Location:/etc/hadoop/conf
# 同步hdfs配置cat/home/hadoop/slaves|xargs-i -t scp/etc/hadoop/conf/hdfs-site.xml [emailprotected]{}:/etc/ha
Modify permissions for a file or directory
Chown
chown [ options ] User [ . Group ] file/dir
Modify the owner of a file
Chgrp
Chgrp [-R] Group name Dir/file
Modify the owning group of a file
Iv. Systems and Networks
Option name
Meaning
passwd xxx
Change Password
Df-ah
View disk space
Ps-ef |grep
View process
Kill-9
Kill the process
mytable from Database mydb to the E:\MySQL\mytable.sql file.
c:\> mysqldump-h localhost-u root-p mydb mytable>e:\mysql\mytable.sql
Example 3: Export the structure of the database mydb to a e:\MySQL\mydb_stru.sql file.
c:\> mysqldump-h localhost-u root-p mydb--add-drop-table >e:\mysql\mydb_stru.sql
Note :-h localhost can be omitted, it is generally used on the virtual host.3) Export data structure onlyformat : mysqldump-u [Database user name]-p-t [the name of the data
localhost-u root-p mydb >e:\mysql\mydb.sql
Then enter the password, wait for an export to succeed, you can check the target file for success. Example 2: Export mytable from Database mydb to the E:\MySQL\mytable.sql file.
c:\> mysqldump-h localhost-u root-p mydb mytable>e:\mysql\mytable.sql
Example 3: Export the structure of the database mydb to a e:\MySQL\mydb_stru.sql file.
c:\> mysqldump-h localhost-u root-p mydb--add-drop-table >e:\mysql\mydb_stru.sql
family within a table:#hbase> major_compact ‘t1‘, ‘c1‘
Configuration Management and node restart1) Modify the HDFs configurationHDFs Configuration Location:/etc/hadoop/conf
# 同步hdfs配置cat/home/hadoop/slaves|xargs-i -t scp/etc/hadoop/conf/hdfs-site.xml [emailprotected]{}:/etc/ha
Spark program
Note: This is not the final solution, so you need to find out why
If the file is important, you need to fix it.View file status one by one and restoreTake this file as an example:/user/admin/data/cdn//20170508/ngaahcs-access.log.3k3.201705081700.1494234003128.gz
To perform a repair command:
HDFs Debug Recoverlease-path HDFs Debug Recoverlease-path/user/admin/data/cdn//20170508/ngaahcs-access.log.c00.1494234003128.gz-retries 10
Summary of Ha
When writing operations scripts in Python, it is often necessary to execute the commands of the Linux shell, the commands module in Python is dedicated to invoking the Linux shell command and returning the status and results, here are the 3 main functions of the commands mod
When writing operations scripts in Python, it is often necessary to execute the commands of the Linux shell, the commands module in Python is dedicated to invoking the Linux shell command and returning the status and results, here are the 3 main functions of the commands mod
Shell script Learning (III): Shell functions and some common symbols and commands
I. Shell functions
Like C, Shell functions encapsulate commands and statements that have fixed functions and are usually used repeatedly in a sing
run the DELETE command.Drop 't1 ′The above is a detailed explanation of some common commands. The specific shell commands for all hbase are as follows, which are divided into several command groups. It can be seen that the commands are useful in English, use help "cmd" for detailed usage.
Copy the Code as follows:
Com
Comparison between Shell script commands and DOS batch processing commands-Linux general technology-Linux technology and application information. The following is a detailed description. [I = s] This post was last edited by lijiang at, January 10 ,.
,
In fact, the defective DOS batch processing file language can still write some powerful scripts, although they g
NOTES: # Note: The # in #!/bin/bash at the beginning of the shell file is not a comment run: 1, bash shell.sh 2, chmod +x shell.sh./shell.sh 3, add to Path change Amount of 4,. ./shell.sh Troubleshooting: 1, syntax error when running with prompt 2, logic error using echo printing, Sleep Number: Sleeping number seconds, reduce the cycle speed using Bash-x To debug a shell script third-party tools: Bashdb bui
redirectionStandard input: Code 0, using Standard output: Code 1, using > or >>Standard error Output: Code 2, using 2> or 2>>1>: Output the correct data to the specified file or device in an overriding way1>>: Output the correct data to the specified file or device in an additive way2>: outputting the wrong data to the specified file or device in an overridden manner2>>: The incorrect data is output to the specified file or device in an additive way4. The judgment basis of the command execution
In linux, ifconfig, shutdown, and other commands cannot use the _ enable Shell command Java code. why cannot I use the ifconfig command in RedHatLinux5? after installing RedHatLinux5, I use some commands on the terminal, such: ifcinfig view local machine...
In linux, commands such as ifconfig and shutdown cannot use th
Shell Special Symbols
* Any of any characters
? Any one character
# comment Characters
\ de-Semantic characters
| Pipe character
$ variable prefix,!$ combination, regular inside means end of line
; Multiple commands written to one line, separated by semicolons
~ User home directory, followed by regular expression to indicate match
put the command behind the command
contains the information and location of the source file. Referencing a hard-link file is equivalent to referencing a source fileCp-l test1 test4The-l parameter creates a hard-link test4 that points to the file test1.Note: You can only create hard links between files on the same storage media, and you cannot create hard links between files under different mount points.The parameter-s creates a symbolic link, or a soft connectionCp-s Test TEST5When copying a linked file, be aware that if you use
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.