You are currently browsing the post archives for January 2010.

Find to copy files into single directory

Posted on January 20, 2010 at 4:49 pm in

Makes copy of subset of dir/ and below with files that match the criteria. It keeps the nested directory structure. Uses
-print0 | xargs -0

to handle spaces in Windows names
find /cygdrive/f/dir1/ -name ‘*.doc’ -print0 | xargs -0 cp -a –target-directory=/cygdrive/c/Temp –parents

Find to copy files into single directory - continue reading

Comment on Find to copy files into single directory


Updated find to list script

Posted on January 20, 2010 at 3:52 pm in

This is an update to the earlier script.

#!/bin/sh
# v1 jcz 30-dec-2009
# This is a silly little script that will search
# for files of a certain type and create a text file of the results
# TODO:
#  – Everything
# – Fix this script to run under cygwin 1.7.X after working fine under 1.5.X

############################
# enable for debugging #####
############################
#…

Updated find to list script - continue reading

Comment on Updated find to list script


Top