Might be simpler to let awk do the calculation, and let the script's input parameters be used in the normal sense.
This code looks longer, because I added lots of checking, but the functional part is more concise.
I gave this a test under Darwin with bash.
You could make a really simple script with this:
If blocks is negative (your threshold is too low), dd will report an error. If it's 0, it will essentially do nothing (but still create the file).
You could do it for ALL mounted filesystems with this modification:
Last edited by otheus; 11-14-2012 at 09:36 PM..
Reason: correction
Hi,
I have one file stat.
Stat file contents are as follows: for example.
H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000
H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000
Now i... (1 Reply)
Hi friends,
In my case, there are serveral PCs running Linux in a LAN.
I would like to to mount the directory /A_river of machine-A to the file system of another machine machine-B so that I can access files in that directory.
I do not know how to do this. The situation is complicated by... (2 Replies)
AIX 5.3 / KSH
I have a Java application which creates a log file a.log. I have a KSH script which does the following action
cp a.log /directory2/b.log
> a.log
After this the file size goes to 0 as per "ls -l"
Then next time when the application writes into this file, the file size... (4 Replies)
Hi,
I have a file by redirecting some contents in unix shell.
Even when there is no content that is being redirected, the file size still shows greater than zero.
but even if there is no matching pattern the file APPRES has size greater than 0bytes.
awk -f AA.awk $logfile>APPRES... (3 Replies)
Hi,
We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB?
I have seen this before we an Oracle temp file... (6 Replies)
Hi,
I'm working on a script that will take the contents of a file, that is in a row and column format, and compare it to a arrangment file. Such that if there is any or all blanks in my content file, the blank will be filled with a flag and will retain the row and column configuration.
Ex.
... (2 Replies)
Hi,
I have created an empty file and a symbolic link to a file. But when I issue the following commands, I am getting the output 2.
stat -c "%s" linkfile
du -hb linkfile
Why this is happening? (4 Replies)
Hello,
I need help for writing a script that fills already generated xml file with data from oracle database and random sequences.
For example if we have the following tags:
<ns1:message>
<ns1:messageId> </ns1:messageId>
<ns1:languageCode> </ns1:languageCode>... (10 Replies)
Hi all
I wonder if its possible to mount on a hp-ux server a file system that was previously mounted on a solaris 10 server. The LUN is on NetApp stoarge.
The problem on hp-ux I cannot do pvcreate on the lun (disk) because contains data.
Any help will be appreciated
FR (2 Replies)
Discussion started by: fretagi
2 Replies
LEARN ABOUT OPENSOLARIS
mkfs.minix
MKFS.MINIX(8) System Administration MKFS.MINIX(8)NAME
mkfs.minix - make a Minix filesystem
SYNOPSIS
mkfs.minix [options] device [size-in-blocks]
DESCRIPTION
mkfs.minix creates a Linux MINIX filesystem on a device (usually a disk partition).
The device is usually of the following form:
/dev/hda[1-8] (IDE disk 1)
/dev/hdb[1-8] (IDE disk 2)
/dev/sda[1-8] (SCSI disk 1)
/dev/sdb[1-8] (SCSI disk 2)
The device may be a block device or a image file of one, but this is not enforced. Expect not much fun on a character device :-).
The size-in-blocks parameter is the desired size of the file system, in blocks. It is present only for backwards compatibility. If omit-
ted the size will be determined automatically. Only block counts strictly greater than 10 and strictly less than 65536 are allowed.
OPTIONS -c, --check
Check the device for bad blocks before creating the filesystem. If any are found, the count is printed.
-n, --namelength length
Specify the maximum length of filenames. Currently, the only allowable values are 14 and 30 for file system versions 1 and 2. Ver-
sion 3 allows only value 60. The default is 30.
-i, --inodes number
Specify the number of inodes for the filesystem.
-l, --badblocks filename
Read the list of bad blocks from filename. The file has one bad-block number per line. The count of bad blocks read is printed.
-1 Make a Minix version 1 filesystem. This is the default.
-2, -v Make a Minix version 2 filesystem.
-3 Make a Minix version 3 filesystem.
-V, --version
Display version information and exit. The long option cannot be combined with other options.
-h, --help
Display help text and exit.
EXIT CODES
The exit code returned by mkfs.minix is one of the following:
0 No errors
8 Operational error
16 Usage or syntax error
SEE ALSO fsck(8), mkfs(8), reboot(8)AVAILABILITY
The mkfs.minix command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/.
util-linux June 2015 MKFS.MINIX(8)