Common Linux commands and common Linux commands
If some commands are not commonly used, you can't remember them. Every time you use them, you need to query them. Here we record some commands:
(1) tar
Decompress:
Tar-xvzf filename.tar.gz unzip filename.tar.gz to the current folder-C you can specify the decompressed dire
Linux screen commands and screen commands
I. background
The system administrator often needs to remotely log on to the Linux server through SSH or telent, and often runs tasks that take a long time to complete, such as system backup and ftp transmission. Generally, we open a remote terminal window for each of these tasks because they have been executed for too long. You must wait until they are completed. D
Basic but practical: Summary of common LNMP commands and common lnmp commands
1. modify directory permissions[Root @ localhost ~] # Chmod 777/home/user Note: only set the permission of the/home/user directory to rwxrwxrwx.[Root @ localhost ~] # Chmod-R 777/home/user Note: Set the permissions of the entire/home/user directory and its files and subdirectories to rwxrwxrwx.2. delete a fileDelete a folder insta
Summary of Common commands in Ubuntu and summary of Common commands in ubuntu
Summary: The commands in this article are incomplete. It is only necessary for LZ to record the frequently used commands in Linux.
History display command history
Ctrl + R Enter command auto-completion Mode
Tree file: displays all files
into slices for ease of Management/Etc/profild // set the global valid variable, permanently validExport dfsf = dfsf // It takes effect only after cancellationSource/etc/profile // repeat the profile to take effect immediately. It is not recommendedLocal variable :~ /. Bash_profile ,~ /. Bashrc ~ /. Bash_logout is only valid for the current userProfile class:1. Set Environment Variables2. Run some commands to be executed during user logon.Bashrc clas
1.which commandWhen entering a Linux command, the shell actually executes the same name command in which directory, we are not known, can be verified using which.2.whereis commandA command similar to which, Whereis is used to retrieve the file associated with a given command.3.apropos commandUse the apropos command to retrieve commands using the keyword. Apropos will use the keyword provided to retrieve the command summary section of all command book
administrators
9
Files related to Kernel
② whatis [command name] or apropros [profile name] is available when viewing brief information about a command(3) Application examples:① help information for the LS command: #man ls② View the Help information for profile services: $man Services (note that you only need to configure the file name, no absolute path is required/etc/services)4.2 get help with Shell built-in commands:(
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
File management commands for Linux commands CP, MV, RMCP, copy command: Copying files or directoriesGrammar:CP [OPTION] ... [-T] SOURCE DESTCP [OPTION] ... SOURCE ... DIRECTORYCP [OPTION] ...-t DIRECTORY SOURCE ... CP SRC DEST:SRC is a file: If Dest does not exist: Creates a new target file and copies the SRC to the target file; if dest exists: If Dest is a file: Use src content to overwrite the dest file;
1. Format description"[email protected] Simon" $"[Email protected] ~" $Both of these methods represent the same. Simon is the specified user, localhost is the computer name, if not set to localhost by default. Simon, ~ refers to the directory where you are currently located.Terminal: Command interpreter, simulation shell2, the user's switchsu[options] [user]such as: Su-rootThe example uses the SU command to change a normal user to the root user and use the option "-" to carry the root environmen
software is difficult to uninstall, but also to prevent the application of other software, you can use this, but a bit risky.Apt-get AutoClean Apt will back up the installed or unloaded software on the hard drive, so if you need space, you can let this command to delete the software you have deletedApt-get Clean This command will also remove the backup of the installed software, but this will not affect the use of the software.Apt-get upgrade--Update all installed packagesApt-get dist-upgrade--
configuration file)dpkg--force-all--purge PackageName Some software is difficult to uninstall, but also to prevent the application of other software, you can use this, but a bit risky.Apt-get AutoClean Apt will back up the installed or unloaded software on the hard drive, so if you need space, you can let this command to delete the software you have deletedApt-get Clean This command will also remove the backup of the installed software, but this will not affect the use of the software.Apt-get u
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 and throw it backstage.
> >> 2> 2>> >
Yesterday, a person on the Bug-bash asked: why [--help did not output help information. Someone answered him because coreutils provided the [command to accept the--HELP option, and Bash's own [command does not accept any options.] When you execute [--help ] in Bash, of course the first priority is the internal command [, not the external command [, the execution of /usr/bin/[--help(on my Mac is/bin/[) to get the help information he wants.In fact, there are other external
Linux yum commands and yum commands
Yum (all called Yellow dog Updater, Modified) is a Shell front-end Package Manager in Fedora, RedHat, and SUSE. Based on RPM package management, You can automatically download and install the RPM package from the specified server, automatically handle dependencies, and install all dependent software packages at a time, you do not need to download and install it repeatedly
Git Common commands and git Common commands===== Git Common commands ======= 1.Git documentation ===Git Chinese Document viewing address: http://git.oschina.net/progit/=== 2.Git basic commands ===Git config -- global user. name // set the global user name without adding gloabl as a localGit config -- global user. email
Common Liunx commands and common liunx commands
1. Tomcat-related commands
Restart tomcat in linux and view tomcat running logs in real time
In Linux, restart Tomcat and run the command!
First, go to the bin directory under Tomcat
Cd/usr/local/tomcat/bin
Use Tomcat to close the command
./Shutdown. sh
Check whether Tomcat is disabled
Ps-ef | grep java
Or ps aux |
provides a function to find corrupted files. Run this command: rpm-Va. Linux will list all corrupted files for you. You can fix the issue through the Linux installation CD.
8. in Linux, there are many files, which we will inevitably encounter when using. in Windows, we can use the "Start/search" menu to quickly determine which folder a file belongs, in Linux, the following command line can help us quickly determine which software package a file belongs:
Rpm-qf
9. after each software package
We can modify the/etc/bash. bashrc file (other users are in their respective directories) so that we can automatically load our custom commands when logging on to shell.
In the process of using linux, it is inevitable that a long string of commands will be bored if they are frequently typed ......
When calling some executable files, you have to write down a long string of parameters ......
We can modify the
Common commands for MongoDB and Common commands for mongodbCommon commands for MongoDB Databases
Show dbs # show database use test # select/create database db. dropDatabase () # Delete the current database db # display the current database db. test_col.insert ({x: 1}) # insert (create set) var_insert = {a: 1, B: 3} db. test_col.insert (var_insert) # insert db as
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.