Sponsored Content
Operating Systems HP-UX Parameter to avoid file being deleted by SAM Post 302349343 by instant000 on Monday 31st of August 2009 05:58:18 PM
Old 08-31-2009
Java Parameter to avoid file being deleted by SAM

Good afternoon.

I am a newbie.

We just had a potentially big problem (negated to having good backups).

Basically, there is an option in SAM, to delete all the data from the system that a user ever created.

Lo and behold, silly me, I choose that option, and all sorts of needed files get deleted.

Luckily, we have a good backup.

Unfortunately, I would like to avoid this situation in the future.

Is there a way to choose which directories are *blocked* from being cleared by SAM?

I noticed , from checking thesam_remove.log that the "/var" directory was blocked, for example, but I want the same exclusion for other directories. Is that possible?

Thanks!
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SAM file

I am having a problem on an HP box, where I am being told that there are too many open files. I am also being told I need to change a SAM file. Could some help me understand what a SAM files is and what it is used for. Thanks. (2 Replies)
Discussion started by: kristian
2 Replies

2. UNIX for Dummies Questions & Answers

Avoid Duplicates in a file

Hi Gurus, I had a question regarding avoiding duplicates.i have a file abc.txt abc.txt ------- READER_1_1_1> HIER_28056 XML Reader: Error occurred while parsing:; line number ; column number READER_1_3_1> Sun Mar 23 23:52:48 2008 READER_1_3_1> HIER_28056 XML Reader: Error occurred while... (7 Replies)
Discussion started by: pssandeep
7 Replies

3. Shell Programming and Scripting

How to avoid a temp file

Hi all. I want to check the free space on a given FS and process the output. Right now, I'm using a temp file to avoid using df twice. This is what I'm doing #!/usr/bin/ksh ... df -k $FS_NAME > $TMP_FILE 2>&1 if ]; then RESULT="CRITICAL - $(cat $TMP_FILE)" else cat $TMP_FILE | ...... (3 Replies)
Discussion started by: fox1212
3 Replies

4. UNIX for Dummies Questions & Answers

how to know who has deleted the file.

Hi, We have a file which needs supper user previleges to delete. There are 10 users having super user preveleges. Some times back that file got deleted. How to know who has deleted that file? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies

5. Programming

[c]Why first file is creating after the second. How to avoid

Hi, My Code is as below: nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie); fclose(fic_sortie); sprintf(PATH_BALISE, "%s.balise", PATH); fic_balise_data = fopen(PATH_BALISE, "a+"); if (fic_balise_data == NULL) {... (1 Reply)
Discussion started by: ezee
1 Replies

6. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

7. Shell Programming and Scripting

Avoid overwriting backup file when multiple entries need to replace in one file input from another

Hello, I have been working on script in which search and replace the multiple pattern. 1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh 2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies

8. Shell Programming and Scripting

Write only changes to file - avoid duplicates

I want to create a file, to save a list of fail2ban blocked ip addresses. So I thought I'd create a loop that will check with fail2ban every minute, and write the ip addresses to a file. while true; do echo $(fail2ban-client status asterisk-iptables | grep 'IP list' | sed 's/.*://g' | sed -e... (4 Replies)
Discussion started by: aristosv
4 Replies
samlog_viewer(1)					      General Commands Manual						  samlog_viewer(1)

NAME
samlog_viewer - a tool for viewing and saving the SAM logfile SYNOPSIS
mmddhhmm[[cc]yy]] mmddhhmm[[cc]yy]] user] ofile] [file] DESCRIPTION
The command enables the viewing of part or all of the SAM logfile (or another file containing data in the same format) at varying levels of detail. This tool is run by SAM whenever the option is chosen. It can also be run independently of SAM, in either interactive or nonin- teractive mode. The command executes in either interactive or noninteractive mode, depending on the options given. In noninteractive mode, filters the source file and writes the resulting data either to stdout or to a destination file. In interactive mode, displays a graphical user inter- face enabling you to try different combinations of filtering, save one or more versions of the source file to other files, scroll back and forth among the logfile entries, etc. Under no circumstances is destructive to the contents of the SAM logfile (or whatever source file is specified by file). The contents of the source file are filtered and displayed (or output) according to the settings of the available filters. Multiple instances of can be run simultaneously without harmful effects. Filters supports three types of filters: level of detail, date/time, and user filters. These filters can be used in combination to provide highly selective logfile viewing. The level of detail filters control how much detail is displayed. The SAM logfile may contain entries of many different types. The entry types currently supported are: summary, detail, verbose, error, and note. The level of detail filters display some or all of these entry types, depending on which filter is chosen. The level of detail filters are: Displays only the higher level messages. These include summary, error, and note (warnings, other entries worthy of special attention) entry types. Includes level of detail, and adds detail log entries. If no level of detail is specified, this is the default. Includes level of detail, and adds verbose log entries. Displays only the literal commands that were executed. These commands may include HP-UX commands as well as SAM commands and scripts. The date/time filters are used to ask for entries written since a specific date/time, before a specific date/time, or both. The user filters are for viewing only those entries written by a particular user. If invoked with the option, its argument is used as the user whose entries should be shown. If user filtering is selected by the option, displays only entries made by that user and disallows any changes to the user filtering. This is useful for allowing nonprivileged users to run and see only those entries that pertain to them. Otherwise, allows the user filtering to be changed, or completely disabled, from its interactive filtering screen. Options The following options enable you to set up filtering and other attributes. If runs interactively, these attributes may also be set and modified in the various supported menus and displays. The available options are: The option sets the start date/time filter to the date/time given by its argument. The date/time is specified in the same way as it is for the command (see date(1)): mm Month specified as a two digit number (e.g., dd Day specified as a two digit number. hh Hour specified as a two digit number (24-hour clock form). mm Minute specified as a two digit number. cc Century minus one. cc is optional when specifying the year. yy The last two digits of the desired year. If this is not specified, the current year is used. To specify a year in two digits, the valid ranges are 70-99 (20th century) and 00-37 (21st century). To specify a year in four digits, the valid range is 1970-2037. If no start time is given, the beginning of the log is used as the start time. The option sets the end date/time filter to the date/time given by its argument. The date and time is speci- fied as described above for the option. If no end time is given, then an end date/time of infinity (no end time) is used. The option sets the desired level of detail. One of the letters must be specified as the required argument. The level of detail is set as follows: If the option is not specified, the level of detail is used by default. The option sets the user filter to the user name or user ID specified by user. Only entries logged by this user are displayed. If the option is omitted, entries logged by all users are displayed by default. The option causes the filtered output to be written to the output file ofile. The option implies the option described below. If ofile is the output is written to stdout. If is omitted, the output is written to either stdout (if is specified) or to the interactive display (if is omitted). The option enables automatic timestamping. If specified, each log entry is tagged with the time of day at which it was written. Timestamping is disabled by default. The option forces noninteractive behavior. If specified, runs noninteractively, using the default or specified values for all supported options and source/destination files. file Specifies the name of the file from which log data is read. The format of the data in the specified file must be the same as that used for raw SAM logfile data. If omitted, the SAM logfile is read. If file is stdin is read and runs noninteractively. If given, file must be the last argument specified on the command line. EXAMPLES
Capture the current contents of the SAM logfile using default filtering, and put into the file The following example does the same thing: View only the commands executed by SAM on behalf of user between 8am June 5, 1994 and 10pm August 14, 1994, and view the data interac- tively: Noninteractively read data from stdin, timestamp it, and save the result in a file called Do the same as above, but instead have the data appear on stdout: or FILES
SAM logfile. Archived version of created when the logfile is automatically trimmed by SAM when its size becomes too large. Its contents are included in the log entries read by Temporary files used by SEE ALSO sam(1M). samlog_viewer(1)
All times are GMT -4. The time now is 08:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy