With the help of Find command by passing an argument, the files which are 7 days older can be deleted.
Command Syntax :
find /pathtodir -type f -mtime +5 -exec rm {} \;
...
If you are running a computer shop or any business with computers, you definitely need a server recovery action plan. Why? Usually a business nightmare such as a server crash followed by extensive data loss may bring a catastrophic impact...
How to print matching lines in grep
You have 2 files and if you wants to print the matching line from one file to another use below command.
cat a.txt | while read i ; do grep “$i” b.txt ; done;
...