The road to mathematics-the basic technology of distributed Computing-linux/unix (2)

Source: Internet
Author: User

Let the process run in the background, return immediately after executing the command, continue to execute other commands, add "&" at the end of the command line

bash-4.2$ Find ~-name Doc &
[1] 5453
bash-4.2$/home/myhaspl/hadoop-2.4.1/share/doc
/home/myhaspl/pypy-2.3.1-src/site-packages/numpy/doc
/home/myhaspl/pypy-2.3.1-src/ctypes_configure/doc
/home/myhaspl/pypy-2.3.1-src/pypy/doc
/home/myhaspl/numpy/doc
/home/myhaspl/numpy/build/lib.linux-x86_64-2.7/numpy/doc
/home/myhaspl/numpy/numpy/doc
/home/myhaspl/numpy/numpy/numpy/doc
/home/myhaspl/numpy/numpy/numpy/f2py/doc

redirect

The following command finds the file and redirects the result list to a file

bash-4.2$ Find ~-name Doc >mydoclist &
[1] 5461
bash-4.2$ ls
hadoop-2.4.1 hadoop-2.4.1.tar.gz numpy
hadoop-2.4.1-src.tar.gz mydoclist pypy-2.3.1-src
[1]+ complete Find ~-name Doc > Mydoclist
bash-4.2$ Cat Mydoclist
/home/myhaspl/hadoop-2.4.1/share/doc
/home/myhaspl/pypy-2.3.1-src/site-packages/numpy/doc
/home/myhaspl/pypy-2.3.1-src/ctypes_configure/doc
/home/myhaspl/pypy-2.3.1-src/pypy/doc
/home/myhaspl/numpy/doc
/home/myhaspl/numpy/build/lib.linux-x86_64-2.7/numpy/doc
/home/myhaspl/numpy/numpy/doc
/home/myhaspl/numpy/numpy/numpy/doc
/home/myhaspl/numpy/numpy/numpy/f2py/doc
/home/myhaspl/numpy/numpy/build/lib.linux-x86_64-2.7/numpy/doc
bash-4.2$

Redirect added to a file, using ">>"

bash-4.2$ Find ~-name Hadoop >>mydoclist &
[1] 5466

bash-4.2$ Cat Mydoclist
/home/myhaspl/hadoop-2.4.1/share/doc
/home/myhaspl/pypy-2.3.1-src/site-packages/numpy/doc
/home/myhaspl/pypy-2.3.1-src/ctypes_configure/doc
/home/myhaspl/pypy-2.3.1-src/pypy/doc
/home/myhaspl/numpy/doc
/home/myhaspl/numpy/build/lib.linux-x86_64-2.7/numpy/doc
/home/myhaspl/numpy/numpy/doc
/home/myhaspl/numpy/numpy/numpy/doc
/home/myhaspl/numpy/numpy/numpy/f2py/doc
/home/myhaspl/numpy/numpy/build/lib.linux-x86_64-2.7/numpy/doc
/home/myhaspl/hadoop-2.4.1/bin/hadoop
/home/myhaspl/hadoop-2.4.1/etc/hadoop
/home/myhaspl/hadoop-2.4.1/share/hadoop
/home/myhaspl/hadoop-2.4.1/share/hadoop/httpfs/tomcat/webapps/webhdfs/web-inf/classes/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/hadoop/httpfs/tomcat/webapps/webhdfs/web-inf/classes/org/apache/hadoop/lib/ Service/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/api/src-html/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/api/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/api/org/apache/hadoop/lib/service/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/src-html/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/src-html/org/apache/hadoop/lib/service/ Hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/org/apache/hadoop/lib/service/hadoop


This blog all content is original, if reproduced please indicate sourcehttp://blog.csdn.net/myhaspl/uses the pipe "|" To change the output of the 1th command to the input of the 2nd command.
bash-4.2$ Find ~-name hadoop|grep HDFs
/home/myhaspl/hadoop-2.4.1/share/hadoop/httpfs/tomcat/webapps/webhdfs/web-inf/classes/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/hadoop/httpfs/tomcat/webapps/webhdfs/web-inf/classes/org/apache/hadoop/lib/ Service/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/src-html/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/src-html/org/apache/hadoop/lib/service/ Hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/org/apache/hadoop
/home/myhaspl/hadoop-2.4.1/share/doc/hadoop/hadoop-hdfs-httpfs/apidocs/org/apache/hadoop/lib/service/hadoop

The road to mathematics-the basic technology of distributed Computing-linux/unix (2)

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.