Yii Framework Forum: Shell Bash Script Find and Move - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Shell Bash Script Find and Move

#1 User is offline   raghu125coorg 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-August 16

Posted 01 August 2016 - 09:28 AM

I have the script writte to recursively find and copy files to a desired location

#!/bin/bash
# a script to recursively find and copy files to a desired location
find /path/xml -type f -iname '*.XML' -print0 |
while IFS= read -r -d '' f;
do cp -- "$f" /path/www/sites/default/files/xml ;
done

Now i want to find the latest Zip file inside the folder, unzip it and move the new file to another folder in the same system,
renaming it to Current date.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users