I need to format the output of the command "df -h":
I used awk:
The lines with shorter filesystems, like "tmpfs, /dev/sda1" came out fine, but the longer filesystems, like "/dev/mapper/rootvg-lv01" above, somehow the size got put to the next line, making that line shifted. I've experimented with different column width and couldn't fix it. How do I get those columns all aligned?
thanks!
J.
Moderator's Comments:
Please use code tags next time for your code and data. Thanks
below is the output is ls -l
-rw-r--r-- 1 tonyt staff 3212 Apr 17 1999 file1
-rw-r--r-- 1 tonyt staff 4541 Mar 3 21:08 file2
why the date format is not the same? (6 Replies)
Hi all, I'd like to capture the output from the 'top' command to monitor my CPU and Mem utilisation.Currently my command isecho date
`top -b -n1 | grep -e Cpu -e Mem` I get the output in 3 separate lines.Tue Feb 24 15:00:03
Cpu(s): 3.4% us, 8.5% sy .. ..
Mem: 1011480k total, 226928k used, ....... (4 Replies)
Dear all,
I have written a program which access database and displays the values returned by the query . There are 10 columns to be displayed in one row. But am ending with 5 lines displayed on 1st line and the next 5 in the 2nd line.
Ex :
21608 10-20-2007 148 Al's Appliance... (7 Replies)
Hi all,
I have input text file of this format
objectclass:endeavor
pid:12345
postalAddress:379 PROSPECT ST
street:STE B
l:TORRINGTON
st:CT
postalCode:067905238
telephoneNumber:9999999999... (2 Replies)
i am running df -k command on aix machine.
i got the output like this. i need to store into file and send that file into microsoft excel.i need to allign properly.
Filesystem 512 blocks Free % Used Iused %Iused Mounted on
/dev/hd4 262144 126488 52% ... (9 Replies)
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Hello Learned People,
Good evening. I have absolutely no idea as how to do this & I admit that I do not know anything in unix. I must learn this one of these days.
Im a help desk incharge today & someone gave me this file to be formatted & I have a file like this.
vi NewFile.txt
232... (8 Replies)
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
I have written some scripts that resulted in the table below (Column1 is ITEM, Column2 is Group, Column3 is Category and Column4 is Quantity) but I want the output in another format:
Input:
K123 X CATA 3
K123 Y CATA 4
K123 Z CATA 2
K123 X CATB 5
K123 Y CATB 2
K123 Z CATB 2
B65 M CATB... (7 Replies)
Hello Team,
I have the following details in a txt file (please note the spaces and tabs)
C1 C2 C3
------------------ --------------- -------------
abc, xyz 2 8
pqr 2 ... (9 Replies)
Discussion started by: H squared
9 Replies
LEARN ABOUT SUSE
o2image
o2image(8) OCFS2 Manual Pages o2image(8)NAME
o2image - Copy or restore OCFS2 file system meta-data
SYNOPSIS
o2image [-r] [-I] device image-file
DESCRIPTION
o2image copies the OCFS2 file system meta-data from the device to the specified image-file. This image file contains the file system
skeleton that includes the inodes, directory names and file names. It does not include any file data.
This image file can be useful to debug certain problems that are not reproducible otherwise. Like on-disk corruptions. It could also be
used to analyse the file system layout in an aging file system with an eye towards improving performance.
As the image-file contains a copy of all the meta-data blocks, it can be a large file. By default, it is created in a packed format, in
which all meta-data blocks are written back-to-back. With the -r option, the user could choose to have the file in the raw (or sparse) for-
mat, in which the blocks are written to the same offset as they are on the device.
debugfs.ocfs2 understands both formats.
o2image also has the option, -I, to restore the meta-data from the image file onto the device. This option will rarely be useful to end-
users and has been written specifically for developers and testers.
OPTIONS -r Copies the meta-data to the image-file in the raw format. Use this option only if the destination file system supports sparse files.
If unsure, do not use this option and let the tool create the image-file in the packed format.
-I Restores meta-data from the image-file onto the device. CAUTION: This option could corrupt the file system.
EXAMPLES
[root@node1 ~]# o2image /dev/sda1 sda1.out
Copies metadata blocks from /dev/sda1 device to sda1.out file
[root@node1 ~] o2image -I /dev/sda1 sda1.out
Use with CAUTION. Copies meta-data blocks from sda1.out onto the /dev/sda1 device.
SEE ALSO debugfs.ocfs2(8)fsck.ocfs2(8)AUTHORS
Oracle Corporation
COPYRIGHT
Copyright (C) 2007, 2010 Oracle. All rights reserved.
Version 1.4.3 February 2010 o2image(8)