Writing a script to backup up /home/username
I need to write a scritp that can list all users dir and backup them up individually as .tar
Can some one please help |
Automating backups with Tar
As for getting a list of all usernames, you're best bet is probably going to be to 'cat' /etc/passwd and pipe it to 'cut -d : -f1' inside a loop. |
for retrieving user names
just awk would do Code:
awk -F":" '{print $1}' /etc/passwd |
tar cvf home.tar /home
|
All times are GMT -5. The time now is 03:14 PM. |