I'd like to get only the first 5 lines of the ls -lt command, i tried to pass to head as a file ip but didnt work, is there any other way to do it.
I am trying to find the lates log files for the last 5 days.
what i tried
head -5 < ls -lt alog*
Thanks.
-d (1 Reply)
Is there a way to combine two lines onto a single line...append the following line onto the previous line?
I have the following file that contains some blank lines and some lines I would like to append to the previous line...
current file:
checking dsk c19t2d6
checking dsk c19t2d7
... (2 Replies)
I seem to have gotten myself in over my head on this one. I need help combining lines together.
I have a text file containing 24,000 lines (exactly why I need awk) due to bad formatting it has separated the lines (ideally it should be 12,000 lines total).
Example of file:
... (2 Replies)
Dear Experts
I am trying to find if it is possible to combine unix commands in awk program. For example if it is possible embed rm or ls or any unix command inside the awk program and while it is reading the file besides printing be able to do some unix commands. I am thinking may be just print... (2 Replies)
Hi
I am fairly new to shell scripting
i have some file with outout
1011
abc fyi
6.1.4.5
abr tio
70986
dfb hji
4.1.7
....some text
111114
i have to format this text to
1011 abc fyi 6.1.4.5 abr tio
70986 dfb hji 4.1.7 ....some text
111114 (3 Replies)
This is the problem actually:
This regex:
egrep "low debug.*\".*\"" $dbDir/alarmNotification.log
is looking for data between the two quotation marks:
".*\"
When I hate data like this:
low debug 2009/3/9 8:30:20.47 ICSNotificationAlarm Prodics01ics0003 IC... (0 Replies)
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
I am trying to come up with a good approach to taking a file and only printing 10 columns.
The input file has duplicate lines but only the 6th column has real value.
I just need to combine the lines and output 1 line per
example file:
1 2.0765 AA 10 0.6557 .....
1 2.0765 AA 10 0.6655 .....
2... (12 Replies)
Dear all,
I have a file like this:
imput
scaffold_0 1
scaffold_0 10000
scaffold_0 20000
scaffold_0 25000
scaffold_1 1
scaffold_1 10000
scaffold_1 20000
scaffold_1 23283
and I want the output like this:
scaffold_0 1 scaffold_0 10000
scaffold_0 10000 scaffold_0 20000... (6 Replies)
Hi All,
I have a file which has the following sample lines
--
<Member name="Canada"
Currency="CAD"
--
<Member name="UK"
Currency="GBP"
--
<Member name="Switzerland"
Currency="CHF"
--
<Member name="Germany"
Currency="EUR"
-- (11 Replies)
Discussion started by: dev.devil.1983
11 Replies
LEARN ABOUT LINUX
fiz
FIZ(1) General Commands Manual FIZ(1)NAME
fiz - analyze damaged zoo archive for data recovery
SYNOPSIS
fiz archive[.zoo]
DESCRIPTION
Fiz is used to analyze damaged zoo archives and locate directory entries and file data in them. The current version of fiz is 2.0 and it
is meant to be used in conjunction with zoo version 2.0. Fiz makes no assumptions about archive structure. Instead, it simply searches
the entire subject archive for tag values that mark the locations of directory entries and file data. In a zoo archive, a directory entry
contains information about a stored file such as its name, whether compressed or not, and its timestamp. The file data are the actual data
for the archived file, and may be either the original data, or the result of compressing the file.
For each directory entry found, fiz prints where in the archive it is located, the directory path and filename(s) found in it, whether the
directory entry appears to be corrupted (indicated by [*CRC Error*]), and the value of the pointer to the file data that is found in the
directory entry. For each block of file data found in the archive, fiz prints where in the archive the block begins. In the case of an
undamaged archive, the pointer to file data found in a directory entry will correspond to where fiz actually locates the data. Here is
some sample output from fiz:
****************
2526: DIR [changes] ==> 95
2587: DATA
****************
3909: DIR [copyrite] ==> 1478
3970: DATA
4769: DATA
****************
In such output, DIR indicates where fiz found a directory entry in the archive, and DATA indicates where fiz found file data in the ar-
chive. Filenames located by fiz are enclosed in square brackets, and the notation "==> 95" indicates that the directory entry found by
fiz at position 2526 has a file data pointer to position 95. In actuality, fiz found file data at positions 2587, 3970, and 4769. Since
fiz found only two directory entries, and each directory entry corresponds to one file, one of the file data positions is an artifact.
Once the locations of directory entries and file data are found, the @ modifier to zoo's archive list and extract commands can be used and
the archive contents selectively listed or extracted, skipping the damaged portion. This is further described in the documentation for
zoo(1).
In the above case, commands to try giving to zoo might be x@2526,2587 (extract beginning at position 2526, and get file data from position
2587), x@3090,3970 (extract at 3090, get data from 3970) and x@3909,4769 (extract at 3909, get data from 4769). Once a correctly-matched
directory entry/file data pair is found, zoo will in most cases synchronize with and correctly extract all files subsequently found in the
archive. Trial and error should allow all undamaged files to be extracted. Also note that self-extracting archives created using sez (the
Self-Extracting Zoo utility for MS-DOS), which are normally executed on an MS-DOS system for extraction, can be extracted on non-MSDOS sys-
tems in a similar way.
SEE ALSO zoo(1)BUGS
Random byte patterns can occasionally be incorrectly recognized as tag values. This occurs very rarely, however, and trial and error will
usually permit all undamaged data to be extracted.
DIAGNOSTICS
Fiz always exits with a status code of 0.
FUTURE DIRECTIONS
Automation of data recovery from a damaged archive is potentially achievable. However, since damaged archives occur only rarely, fiz as it
currently stands is unlikely to change much in the near future.
AUTHOR
Rahul Dhesi
Jan 31, 1988 FIZ(1)