www.evidhyashala.com provides free free mock test , free online exam , online exam free test series , online exam free , Online Test Exam Series , free exam papers past papers , online exam form ,Online Test Series for Exam Prep. Free Mock Tests - for All govt jobs. Bank PO, Clerk, SSC CGL, CHSL, JE, GATE, Insurance, Railways, IBPS RRB, SBI, RBI, IPPB, BSNL TTA

Sponser Link

know more info pls click here

xargs Unix Command/r&d22112011

xargs

  1.  Makes stdin as a command line argument
  2.  useful for running a command a bunch of times
  3.  Example: Search in all files for a variable name
               $ find . name “*.cxx” | xargs grep var

     4.This is equivalent to running grep on all *.cxx files in all subdirectories.
         
              $ grep *.cxx

    5. The above would only search files in current directory


xargs (is xtreme)

  • Use -I{} to replace all occurrences of {} in the command with the standard input.

  • Example (I use all the time): Run all the scripts in all subdirectories
        EX.
                   $ find . name "*.sh" | xargs I{} sh {}
    
  • Copy lots of files at once.
               Ex.
                    $ find . name '*.dat' | xargs I{} cp {} /folder/


0 comments:

Popular Posts