There is a file which logs all errors and alerts of the database called alert log. I have a requirement as follows:
1. Check the current date and search for the first occurance of the current date in the alert log.
2. As soon as the first occurance is found, copy the subsequent contents... (5 Replies)
I have a file like this..
Maharastra Mumbai worli
Maharastra Mumbai navy
maharatra Pune
Maharastra Nagpur
Karnataka Bangalore
Karnataka Mysore
Karnataka Mangalore
Punjab Amritsar
punjab Jalandar
my expected outcome should be like this
Maharastra Mumbai worli
---------- ... (9 Replies)
Hi all,I am really new to Shell Scripting.I have the following doubt.
Let us assume the one sample file which contains the below data
HEADERCARMENTRACIE1555090414
PERIOD0905090501090531
DETAIL0645693037023073836
GROUNDAV 090501 01
GROUNDAV 090502 01
TRIP 0091282542 0905084101... (5 Replies)
Hi all,
I am looking for a coomand to search for the keywords in susequenct lines. Keyword1 in a line and Keyword2 in the very next line.
Once i found the combination ineed to print the lines with patterns and the line above and one below.
I am giving an example here: Keywords are :ERROR and... (12 Replies)
I have my data something like this
I need to search for the keyword yyyy in the susequent lines and if it is present, delete the second line with keyword.
In other words, if a keywords is found in two subsequent lines delete the second line.
input data:
aaaa bbbbb cccc dddd
xxxx... (4 Replies)
I've run into a problem getting exactly what I want out of awk - some folks may recognize this as an output from Amazon's ec2-describe-instances:
Given the following:
INSTANCE i-4960f321
BLOCKDEVICE Line2Var2
TAG instance i-4960f321 Name web1
TAG instance i-4960f321... (2 Replies)
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Hi,
I have a requirement like, I have a list of pattens in a file say pattern.txt,
PHC111
PHC113
and in another file called master.lst i have entries like,
PHC111
a
b
PHC112
a
PHC113
b
c
PHC114
d
e (5 Replies)
I have a simple xml file,need the output with the <value> tag and <result> tag
text.xml
<test-method status="FAIL" duration="45">
<value>
Id=C18
</value>
<result>
wrong paramter
</result>
</test-method>
<test-method status="FAIL" duration="45">
<value>
Id=C19
</value>
<result>
Data... (5 Replies)
Discussion started by: DevAakash
5 Replies
LEARN ABOUT DEBIAN
bup-restore
bup-restore(1) General Commands Manual bup-restore(1)NAME
bup-restore - extract files from a backup set
SYNOPSIS
bup restore [--outdir=outdir] [-v] [-q]
DESCRIPTION
bup restore extracts files from a backup set (created with bup-save(1)) to the local filesystem.
The specified paths are of the form /branch/revision/path/to/file. The components of the path are as follows:
branch the name of the backup set to restore from; this corresponds to the --name (-n) option to bup save.
revision
the revision of the backup set to restore. The revision latest is always the most recent backup on the given branch. You can dis-
cover other revisions using bup ls /branch.
/path/to/file
the original absolute filesystem path to the file you want to restore. For example, /etc/passwd.
Note: if the /path/to/file is a directory, bup restore will restore that directory as well as recursively restoring all its contents.
If /path/to/file is a directory ending in a slash (ie. /path/to/dir/), bup restore will restore the children of that directory directly to
the current directory (or the --outdir). If the directory does not end in a slash, the children will be restored to a subdirectory of the
current directory. See the EXAMPLES section to see how this works.
OPTIONS -C, --outdir=outdir
create and change to directory outdir before extracting the files.
-v, --verbose
increase log output. Given once, prints every directory as it is restored; given twice, prints every file and directory.
-q, --quiet
don't show the progress meter. Normally, is stderr is a tty, a progress display is printed that shows the total number of files
restored.
EXAMPLE
Create a simple test backup set:
$ bup index -u /etc
$ bup save -n mybackup /etc/passwd /etc/profile
Restore just one file:
$ bup restore /mybackup/latest/etc/passwd
Restoring: 1, done.
$ ls -l passwd
-rw-r--r-- 1 apenwarr apenwarr 1478 2010-09-08 03:06 passwd
Restore the whole directory (no trailing slash):
$ bup restore -C test1 /mybackup/latest/etc
Restoring: 3, done.
$ find test1
test1
test1/etc
test1/etc/passwd
test1/etc/profile
Restore the whole directory (trailing slash):
$ bup restore -C test2 /mybackup/latest/etc/
Restoring: 2, done.
$ find test2
test2
test2/passwd
test2/profile
SEE ALSO bup-save(1), bup-ftp(1), bup-fuse(1), bup-web(1)BUP
Part of the bup(1) suite.
AUTHORS
Avery Pennarun <apenwarr@gmail.com>.
Bup unknown-bup-restore(1)