Help with advanced tar, ls, and egrep command...
I am migrating users off of a Linux mail server and need to grab the "password" files that the 3rd party mail software package uses for each user. Here is the scenario:
/var/*mail-program*/Accounts/user1.ext /var/*mail-program*/Accounts/user2.ext Inside the user#.ext file (text file) is a "LastLogin" date, and I would like to only grab those users that have logged into the mail this current year. On top of that the mail file is in the same directory and I only want to grab the password file. After that if I can tar the files, to send them to another server that would be great. Has anyone used any deep ls / grep / egrep / tar commands for similar operations? Any help would be appreciated. Thanks |
Code:
#!/bin/bash |
All times are GMT -5. The time now is 06:12 PM. |