Common linux commands [record at any time]

Source: Internet
Author: User

1. Check and kill the process. Take firefox as an example.

# Ps-e | grep firefox | cut-d "? "-F1 | xargs kill

2. svn clears the conflict file

# Svn status | grep ^ C | sed's/^ C [] */\. \/G' | xargs rm-f

# Svn up

3. Keyword multi-file replacement (the instance is compatible with the Joomla1.5 mtree component in php5.3)

# Cd/var/www/joomla15/components/com_mtree/Savant2/
# Sed-I "s/function plugin (\ s * &/function plugin (/g" 'grep' function plugin'-rl ./'

In all files under the Savent2 directory, replace function in (& with function plugin (, which is about to remove the parameter,

Otherwise, php5.3 + will prompt that the reference transfer method for row Participation & is not recommended. You only need to input real parameters directly.

4. vim settings auto-completion

Check that vim7 + exists in the autoload Directory, which contains various codes to complete vim code, such as pythoncomplete. vim, javascriptcomplete. vim, and such files.

Add a line to the vimrc configuration file.

Setlocal omnifunc = syntaxcomplete # Complete

It indicates that vim automatically searches for the file completion file based on the full file type.

Open a file, such as the PHP file, in the <? Php?> Enter the first few characters of a function in the tag, such as mysql, and then Ctrl + x, Ctrl + o.

5. Converting pdf to jpg makes ghostscript very powerful, but the command is too hard to remember.

gs -SDEVICE=jpeg -r600x600 -sPAPERSIZE=letter -sOutputFile=/home/lake/Downloads/st_%04d.jpg -dNOPAUSE -dBATCH -- /home/lake/Downloads/st.pdf

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.