I would like a simple shell script that will allow me to display to screen all unsuccessful su attempts in my sulog file, for the present date.
I have been trying several different combinations of commands, but I can't quite get the syntax correct.
The mess I have right now (don't laugh) is... (4 Replies)
Hi Team,
I am new to this forum and also trying to learn Unix.
I will highly appriciate your help if you can help me to get the right command .
{{{
I use the command " today | egrep '(10:| 11: )' | grep ERROR " to grep all the files that has been error betweeen 10 to 11... (6 Replies)
Hi All,
Please i need to know the difference between grep, egrep & grep -i when used to serach through a file.
My platform is SunOS 5.9 & i'm using the korn shell.
Regards,
- divroro12 - (2 Replies)
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
I am new to UNIX Shell. I want to list the files names in the current directory that are not start with 'AB' and have at least two characters. For example, say I have those files in the current directory: AB, AC, AD, AE, B, C. After executing the command, AC, AD, AE will be listed on the screen. ... (6 Replies)
Hello,
I have files in a directory with names like,
./f0/84.40_E1200_85.39_E1300_f0_r00_1300-ON-0.25_S7A_v4_47.19.1.out.txt
./f0/84.40_E1200_85.83_E1200_f0_r00_1200-ON-0.25_S7A_v4_47.19.1.out.txt
./f0/84.60_E1100_86.45_E1100_f0_r00_1100-ON-0.25_S7A_v4_47.19.1.out.txt... (5 Replies)
Hi,
I have an url.txt I need check them and grep some data.
url.txt
domain.com
domain2.com
domain3.com
.....All sites urls have in source this patterns:
"web=pattern1"
"net++pattern2"
"office**pattern3"
I need this output:
domain.com: pattern1,pattern2,pattern3
domain2.com:... (3 Replies)
I have a large XML file that I want to parse, and only print one specific value if two values are met.
This is the code so far:
#!/usr/local/bin/python
import xml.etree.ElementTree as ET
tree = ET.parse('onedb-dhcp.xml')
root = tree.getroot()
# This successfully gets all... (1 Reply)
Hi ,
I'm looking for some code that can copy and paste form file1 to file2 with 2 criterial meet.
file1:
test "sp-j1"
test "sp-j2"
test "sp-j3"
test "sp-j4"
file2:
sub Pre_Shorts1 (Status_Code, Message$)
global Status
!if Message$ <> "" then print... (3 Replies)
Discussion started by: kttan
3 Replies
LEARN ABOUT CENTOS
amlabel
AMLABEL(8) System Administration Commands AMLABEL(8)NAME
amlabel - label an Amanda tape
SYNOPSIS
amlabel [--barcode barcode] [--meta meta-label] [--assign] [-f] [--version] [-o configoption...] config [label] [slot slot]
DESCRIPTION
This command applies a label to an Amanda volume, erasing the volume in the process.
Amanda uses labels to identify volumes: amdump(8) and amflush(8) verify the label before writing to make sure the proper volume is loaded,
and the recovery programs use the label to ensure they are reading the data they expect.
If no [slot] and no [barcode] is given, then amlabel labels the tape in the current slot of the default changer. If a slot is given, it
labels the volume in that slot. If a barcode is given, it labels the volume with that barcode. Label may be any string that does not
contain whitespace and that matches the labelstr (see amanda.conf(5)).
If [label] is not given, an autolabel is generated, see autolabel in amanda.conf(5).
If [--assign] is given, the barcode and meta-label are assigned to the label without labeling the volume. The label must already be in the
tapelist file.
This command also appends the new volume to the tapelist(5) file, so that they will be used in the order they are labeled (depending on the
taperscan in use -- see amanda-taperscan(7)).
As a precaution, amlabel will not write a label if the volume already contains an active label or if the label specified is on an active
tape. The [-f] (force) flag bypasses these verifications.
OPTIONS --barcode barcode
With [--assign], assign the barcode to the label. Without [--assign], label the volume with that barcode.
--meta meta-label
Assign the meta label to the label after labeling the volume.
--assign
Assign the barcode or meta-label to the label without labeling the volume. The label must already be in the tapelist file.
-f
Force the label operation; see above
--version
Output version information
-o configoption
See the "CONFIGURATION OVERRIDE" section in amanda(8).
EXAMPLE
Write an Amanda label with the string "DMP000" on the current volume:
% amlabel daily DMP000
Label the tape in slot 3 of the changer with the label "DMP003":
% amlabel daily DMP003 slot 3
MESSAGES
Label 'label' doesn't match labelstr 'labelstr'
The given label does not match the configured labelstr. Even with -f, this is an error.
Label 'label' already on a volume
The given label is already on another volume in the tapelist, and Amanda will not write it to this volume unless forced.
Found label 'label', but it is not from configuration config.
The label amlabel found on the volume does not match this configuration's labelstr, so it is probably part of a different Amanda
configuration. Amanda will not overwrite the label unless it is forced.
Volume with label 'label' contains data from this configuration.
The label amlabel found on the volume still has valid data on it and Amanda will not overwrite it unless forced. Note that this does
not distinguish between active and inactive volumes.
SEE ALSO amanda(8), amanda.conf(5), tapelist(5), amanda-taperscan(7), amdump(8), amflush(8)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
James da Silva <jds@amanda.org>
Stefan G. Weichinger <sgw@amanda.org>
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 AMLABEL(8)