Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Script to fill the file system mount with empty files to desired size Post 302731247 by chandu123 on Wednesday 14th of November 2012 02:59:50 PM
Old 11-14-2012
Hello,

I tried to run the below code and getting the following error. could you please help.

dd: bad arg -5211234
Usage: dd [if=InputFile] [of=OutputFile] [cbs=Number] [fskip=Number]
[skip=Number] [seek=Number] [count=Number] [bs=Number] [span=yes|no]
[ibs=Number] [obs=Number] [files=Number] [conv=Parameter[, ...]]


Here is the code that i am using.

Code:
#!/bin/ksh
threshold=20
FStoFill=/tmp
set -- $(df -k $FStoFill | tail -1)
dd if=/dev/zero of=$FStoFill/zerofile.$$ bs=1 count=$((($threshold*$2/100)-$3))

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash script working for small size files but not for big size files.

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)
Discussion started by: davidpreml
1 Replies

2. UNIX for Dummies Questions & Answers

how to mount a file system of a remote machine to local file system

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)
Discussion started by: cy163
2 Replies

3. UNIX for Dummies Questions & Answers

Trying to empty file using > but the file size increasing when next append

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)
Discussion started by: firdousamir
4 Replies

4. Shell Programming and Scripting

Unix file empty.. but size is greater than zero??/

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)
Discussion started by: justchill
3 Replies

5. Solaris

Directory size larger than file system size?

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)
Discussion started by: sparcman
6 Replies

6. Shell Programming and Scripting

Compare columns and rows with template, and fill empty slots.

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)
Discussion started by: hizzle
2 Replies

7. Shell Programming and Scripting

Script to check file system size

Dears, the output of this command df -h | tr -s ' ' | cut -f5 -d' ' is capacity 24% 0% 0% 0% 0% 1% 0% 24% 24% 0% 93% 1% (4 Replies)
Discussion started by: xxmasrawy
4 Replies

8. Shell Programming and Scripting

Symbolic link to an empty file shows size 2

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)
Discussion started by: royalibrahim
4 Replies

9. Shell Programming and Scripting

Script which fill data in XML file

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)
Discussion started by: zb99
10 Replies

10. HP-UX

how to mount a file system from a solaris server into an hp-ux system

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
PPI::Token::Number::Version(3)				User Contributed Perl Documentation			    PPI::Token::Number::Version(3)

NAME
PPI::Token::Number::Version - Token class for a byte-packed number SYNOPSIS
$n = 1.1.0; $n = 127.0.0.1; $n = 10_000.10_000.10_000; $n = v1.2.3.4 INHERITANCE
PPI::Token::Number::Version isa PPI::Token::Number isa PPI::Token isa PPI::Element DESCRIPTION
The "PPI::Token::Number::Version" class is used for tokens that have multiple decimal points. In truth, these aren't treated like numbers at all by Perl, but they look like numbers to a parser. METHODS
base Returns the base for the number: 256. literal Return the numeric value of this token. BUGS
- Does not handle leading minus sign correctly. Should translate to a DashedWord. See <http://perlmonks.org/?node_id=574573> -95.0.1.0 --> "-_00cA00" -96.0.1.0 --> Argument "`^A" isn't numeric in negation (-) SUPPORT
See the support section in the main module. AUTHOR
Chris Dolan <cdolan@cpan.org> COPYRIGHT
Copyright 2006 Chris Dolan. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.16.3 2011-02-26 PPI::Token::Number::Version(3)
All times are GMT -4. The time now is 10:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy