find . -name "*" | grep -i scomm | xargs ls -ltr | grep "Aug 13 10" | awk '{print $9}'
to use in the cp command (get the column number 9 which contains the file's full path
cp `find . -name "*" | grep -i scomm | xargs ls -ltr | grep "Aug 13 10" | awk '{print $9}'` /sfs/aamr/scomm/sbprd02
If the search_string contains any special characters (e.g. dot, slash, double quotations ...etc, then preceed it by a '\'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment