To accomplish this we need two commands
- Find command - to find the files which are modified
find . -mtime -5 -type f -name "*.php" ( It gets all the php files which are modified 5 days ago)
- Tar command - to create an archive tar cvf changed_201006014.tar - It creates the archive with the name "changed_20100614.tar"
combine above two commands
tar cvf changed_20100614.tar `find . -mtime -5 -type f -name "*.php"`
It creates archive with the files which are modified 5 days ago.
To accomplish this we need
Mon, 06/14/2010 - 17:56 — AnonymousTo accomplish this we need two commands
- Find command - to find the files which are modified
find . -mtime -5 -type f -name "*.php" ( It gets all the php files which are modified 5 days ago)
- Tar command - to create an archive
tar cvf changed_201006014.tar - It creates the archive with the name "changed_20100614.tar"
combine above two commands
tar cvf changed_20100614.tar `find . -mtime -5 -type f -name "*.php"`
It creates archive with the files which are modified 5 days ago.