Linux Common commands

Source: Internet
Author: User

Find. -name "*.C" | Xargs grep-h "Hello"

In the current directory, look for files that contain hello and that have the suffix named. c

PS Ax | grep "Sleep"

Whether the process that is currently running contains sleep

!!

Last Command executed

CD-

Jump back to the last directory you entered

SSH [email protected]

Using SSH to log in to the 123.123.123.123 server with Jack users

GIT-related

git clone ssh://[url] download code

Git Pull Update code

git checkout [branch_name] into a branch

Git branch-a lists all the branch

Git Branch View current branch

git Add. Add all the changes

git rm-rf [filename] Delete filename modification of this file

Git commit commits and adds comment to the new page

git commit-m "comment content" submission, add directly to comment

Git commit--amend take the last commit

Git push origin [branch_name] Submit upload

Git comment Add Template:

1) put. Commit-msg_template.txt at/home/account/
2) git config--global commit.template ~/.commit-msg_template.txt

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.