Linux / UNIX Tech Support Forum
This is a discussion on want a script keep backup of all users history. within the Shell scripting forums, part of the Development/Scripting category; Hi All, I want to write a script or may be a cron Job, which will make a backup of ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi All,
I want to write a script or may be a cron Job, which will make a backup of the history file. For ex., an administrator may want to keep a backup of all the users history file silently, maybe everyday, just to keep a track of all the commands run by the user. Thanks rc |
| Sponsored Links | ||
|
|
|
|||
|
Thankx Rocky,
It works, but there was just a typo in the script. Code:
[! -d $BAK ] && mkdir -p $BAK || : Code:
[ ! -d $BAK ] && mkdir -p $BAK || : I would like you to explain what does the " || : " do. I might also want you to include a date on the tar file generated, if we can. This way, we can have date wise history backups Thanks again for your help. rc |
|
||||
|
Opps
Thanks for making it correct
__________________
Rocky Jr. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| let users change password using perl script? | james bond | Getting started tutorials | 9 | 24-05-2007 10:32 PM |
| need help in writing backup script | vishaltitre | Shell scripting | 4 | 23-05-2007 10:07 PM |
| Script to add users to multiple servers. | deepakhg | Shell scripting | 0 | 17-03-2007 03:02 AM |
| How to run script when users logouts | tom | Shell scripting | 1 | 31-08-2005 11:42 PM |
| shell script for finding users not logged on for last 10 day | ganes | Shell scripting | 4 | 06-07-2005 11:01 AM |