Sponsored Content
Top Forums UNIX for Advanced & Expert Users Cannot find logical file format for BSD file headers. Post 302957172 by Chris_top_he_r on Wednesday 7th of October 2015 09:37:10 PM
Old 10-07-2015
Thanks!! Finally had time to take a look at the man pages for inode and dirent and it is exactly where I wanted to start learning. How perfect. I feel like I'm on my way.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with find command and list in a long format each found file

The purpose of those comands are to find the newest file in a directory acvrdind to system date, and it has to be recursively found in each directory. The problem is that i want to list in a long format every found file, but the commands i use produce unexpected results ,so the output lists in a... (5 Replies)
Discussion started by: alexcol
5 Replies

2. UNIX for Dummies Questions & Answers

Option in sql script to include column headers when spooling file to .csv format

Can anyone help me how to include COLUMN HEADER when spooling file to .CSV format through SQL statement. Thanks, Akbar (4 Replies)
Discussion started by: s1a2m3
4 Replies

3. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

4. Shell Programming and Scripting

How to check for file name of specific format using find?

I have to find the specific formatted file is present in the received list in the directory, for which I have written: file_list=`ls -lrt /tmp/vinay/act/files |grep "$cdate"| awk '{print $9}'` while read fileStr do find $file_list $fileStr > /dev/null status=`echo $?` if ; then ... (3 Replies)
Discussion started by: IND123
3 Replies

5. Shell Programming and Scripting

Find first created file date in YYYYMMDD format

Hi All, We are copying all the files into ARCHIVE directory after we process them. We are doing this process from last 2 years, now we have a lot of files in ARCHIVE directory. Now I need to find when the first file is copied into this directory? If I Issue, ls -l /ARCHIVE/*.* | tail -1... (3 Replies)
Discussion started by: Raamc
3 Replies

6. Shell Programming and Scripting

Find files older than X with a weird file format

I have an issue with a korn shell script that I am writing. The script parses through a configuration file which lists a heap of path/directories for some files which need to be FTP'd. Now the script needs to check whether there are any files which have not been processed and are X minutes old. ... (2 Replies)
Discussion started by: MickAAA
2 Replies

7. Shell Programming and Scripting

Multiple headers in a file

Hi , I have a .txt file in which I have multiple headers, the header record starts with $ symbol...like the first column name is $Account. I have to keep the header in the first line and delete all the remaining headers which are in the file. I tried using sort adc.txt | uniq -u , but my... (7 Replies)
Discussion started by: gaur.deepti
7 Replies

8. Shell Programming and Scripting

Merging File with headers

Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it? (5 Replies)
Discussion started by: Arun Mishra
5 Replies

9. UNIX for Dummies Questions & Answers

Append file name to fasta file headers in Linux

How do we append the file name to fasta file headers in multiple fasta-files in Linux? (10 Replies)
Discussion started by: Mauve
10 Replies

10. Shell Programming and Scripting

How to find list of missing files based on the file format?

Hi All, In the file names we have dates. Based on the file format given by the user, if any file is not existed for a particular date with in a given interval we should consider that file is missing. I have the below files in the directory /bin/daily/voda_files. ... (9 Replies)
Discussion started by: nalu
9 Replies
MKIMG(1)						    BSD General Commands Manual 						  MKIMG(1)

NAME
mkimg -- utility to make disk images SYNOPSIS
mkimg [-H heads] [-P blksz] [-S secsz] [-T tracksz] [-b bootcode] [-f format] [-o outfile] [-v] [-y] -s scheme -p partition [-p partition ...] mkimg --formats | --schemes | --version DESCRIPTION
The mkimg utility creates a disk image from the raw partition contents specified with the partition argument(s) and using the partitioning scheme specified with the scheme argument. The disk image is written to stdout by default or the file specified with the outfile argument. The image file is a raw disk image by default, but the format of the image file can be specified with the format argument. The disk image can be made bootable by specifying the scheme-specific boot block contents with the bootcode argument and, depending on the scheme, with a boot partition. The contents of such a boot partition is provided like any other partition and the mkimg utility does not treat it any differently from other partitions. Some partitioning schemes need a disk geometry and for those the mkimg utility accepts the tracksz and heads arguments, specifying the number of sectors per track and the number of heads per cylinder (resp.) Both the logical and physical sector size can be specified and for that the mkimg utility accepts the secsz and blksz arguments. The secsz argument is used to specify the logical sector size. This is the sector size reported by a disk when queried for its capacity. Modern disks use a larger sector size internally, referred to as block size by the mkimg utility and this can be specified by the blksz argument. The mkimg utility will use the (physical) block size to determine the start of partitions and to round the size of the disk image. The [-v] option increases the level of output that the mkimg utility prints. The [-y] option is used for testing purposes only and is not to be used in production. When present, the mkimg utility will generate pre- dictable values for Universally Unique Identifiers (UUIDs) and time stamps so that consecutive runs of the mkimg utility will create images that are identical. A set of long options exist to query about the mkimg utilty itself. Options in this set should be given by themselves because the mkimg utility exits immediately after providing the requested information. The version of the mkimg utility is printed when the --version option is given. The list of supported output formats is printed when the --formats option is given and the list of supported partitioning schemes is printed when the --schemes option is given. Both the format and scheme lists a space-separated lists for easy handling in scripts. For a more descriptive list of supported partitioning schemes or supported output format, or for a detailed description of how to specify partitions, run the mkimg utility without any arguments. This will print a usage message with all the necessary details. ENVIRONMENT
TMPDIR Directory to put temporary files in; default is /tmp. EXAMPLES
To create a bootable disk image that is partitioned using the GPT scheme and containing a root file system that was previously created using makefs and also containing a swap partition, run the mkimg utility as follows: % mkimg -s gpt -b /boot/pmbr -p freebsd-boot:=/boot/gptboot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G -o gpt.img The command line given above results in a raw image file. This is because no output format was given. To create a VMDK image for example, add the -f vmdk argument to the mkimg utility and name the output file accordingly. A nested partitioning scheme is created by running the mkimg utility twice. The output of the first will be fed as the contents of a parti- tion to the second. This can be done using a temporary file, like so: % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G -o /tmp/bsd.img % mkimg -s mbr -b /boot/mbr -p freebsd:=/tmp/bsd.img -o mbr-bsd.img Alternatively, the mkimg utility can be run in a cascaded fashion, whereby the output of the first is fed directly into the second. To do this, run the mkimg utility as follows: % mkimg -s mbr -b /boot/mbr -p freebsd:-'mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G' -o mbr-bsd.img To accomodate the need to have partitions named or numbered in a certain way, the mkimg utility allows for the specification of empty parti- tions. For example, to create an image that is compatible with partition layouts found in /etc/disktab, the 'd' partition often needs to be skipped. This is accomplished by inserting an unused partition after the first 2 partition specifications. It is worth noting at this time that the BSD scheme will automatically skip the 'c' partition by virtue of it referring to the entire disk. To create an image that is com- patible with the qp120at disk, use the mkimg utility as follows: % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::20M -p- -p- -p- -p- -p freebsd-ufs:=usr-file-system.ufs -o bsd.img For partitioning schemes that feature partition labels, the mkimg utility supports assigning labels to the partitions specified. In the fol- lowing example the file system partition is labeled as 'backup': % mkimg -s gpt -p freebsd-ufs/backup:=file-system.ufs -o gpt.img SEE ALSO
gpart(8), makefs(8), mdconfig(8), newfs(8) HISTORY
The mkimg utility first appeared in FreeBSD 10.1. AUTHORS
The mkimg utility and manpage were written by Marcel Moolenaar <marcelm@juniper.net> BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 03:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy