Unix command to fill filesystem


 
Thread Tools Search this Thread
Operating Systems Solaris Unix command to fill filesystem
# 1  
Old 11-28-2011
Unix command to fill filesystem

I have been trying to fill all available file space on my Solaris box for my project but have not been successful. I have tried the following script:


tr '\0' '\060' < /dev/zero | dd of=zero2.txt bs=1024 count=1953125

But the only thing i get in return is this:
"d: bad numeric argument: "1953125

Any assistance would be greatly appreciated.

Last edited by rbur101; 11-28-2011 at 09:51 AM.. Reason: Misspell
# 2  
Old 11-28-2011
Code:
#mkfile [size you want]m  zero2.txt
mkfile 20m somefilename

On linux
Code:
#dd if=/dev/zero of=myfilename bs=1024  count=[number of kbytes you want]
dd if=/dev/zero of=somefilename bs=1024 count=100


Last edited by jim mcnamara; 11-28-2011 at 11:33 AM.. Reason: typo corrected
# 3  
Old 11-28-2011
Thanks i tried your solution and this is what I see:

ipsecesp ptypf rsd1c sd4f ttyp7 zero
ipstate ptyq0 rsd1d sd4g ttyp8 zero1.txt
ipsync ptyq1 rsd1e sd4h ttyp9 zero2.txt
kbd ptyq2 rsd1f sd5a ttypa zfs
keysock ptyq3 rsd1g sd5b ttypb
kmdb ptyq4 rsd1h sd5c ttypc
kmem ptyq5 rsd4a sd5d ttypd
# dd if=/dev/zero of=zero2.txt bs=1024 count=100
dd: dev/zero: open: No such file or directory
#
#

Last edited by jim mcnamara; 11-28-2011 at 11:32 AM..
# 4  
Old 11-28-2011
Please note the red slash in your post.... my typo caused this for you. sorry.
# 5  
Old 11-28-2011
OK you are correct that fixed it so if I want to Fill the free space of the subject filesystems with all zeros by creating a series of 2 gigabyte files until the filesystems are full would be this then?


tr '\0' '\060' < dd if=/dev/zero of=zero2.txt bs=1024 count=1000000
# 6  
Old 11-28-2011
Why do you need \060 as the character? - what you gave does not work.

Just use mkfile: it acutally allocates files and fills the disk - this is what it was designed for.
# 7  
Old 11-28-2011
Should you really need to fill with '\060' (a.k.a. '0') instead of nulls, you can use:
Code:
dd if=/dev/zero  bs=1024 count=1000000 | tr '\0' '0' > zero2.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Command to check on which vg filesystem resides

Hi, I need to know on which volume group filesystem resides. TIA (5 Replies)
Discussion started by: sumanthupar
5 Replies

2. Homework & Coursework Questions

unix filesystem question

1. The problem statement, all variables and given/known data: The file system unix use a multilevel indexes access to disk, 12 direct blocks, 1 single indirect block, 1 double indirect block, 1 triple indirect block: Assuming a: block = 512 bytes, pointer = 4 byte, and there is a file of 200... (4 Replies)
Discussion started by: blob84
4 Replies

3. Shell Programming and Scripting

Which filesystem a command is executing from?

Hi. We can have one or more agents of a particular type running on our AIX and Solaris servers. As these agents have usually been installed into their own filesystems, I need to capture the filesystem names for auditing purposes. I've had a search through the forums can see something that fits the... (16 Replies)
Discussion started by: smoosmoo
16 Replies

4. UNIX for Advanced & Expert Users

Command to output ones (like zero-fill), with progress indicator

Well, I was originally going to post this snippet in the original thread titled "how to output ones endlessly like /dev/zero", but that topic was closed without an efficient answer. It was difficult to find (build) a satisfactory answer to this one, so I thought I'd share it here and as a "fill... (1 Reply)
Discussion started by: Gliktch
1 Replies

5. Solaris

what command was used to create a filesystem

How do we determine what command was used (either newfs or mkfs) to create a filesystem? Thanks, (2 Replies)
Discussion started by: Pouchie1
2 Replies

6. UNIX for Dummies Questions & Answers

Copy unix filesystem to windows

Hi all Is there a way to copy a unix filesystem (folders, subfolder and files) to windows (AD) and at the same time maintaine the unix permission (user/group) when copied to windows (AD) filesystem? I want the same permission in windows as I had in unix in one copy job. Is this... (8 Replies)
Discussion started by: tomjen
8 Replies

7. SuSE

filesystem from unix 32 to linux 64

Hi all. Im migrating from a Unix 32 bit to a linux suse 10 64 bit and would like to know whats the best way to migrate the filesystems? cpio? tar? ftp? Could I make a backup in tape in the unix 32 and restore it in the linux 64? thanx (1 Reply)
Discussion started by: mrodrig
1 Replies

8. UNIX for Dummies Questions & Answers

Unix filesystem

hello all, i want to know about the unix file system. about the boot block,super block,and how to access them ,all the geometry details of the file systemetc etc... where can i find this??? i'l b happy if u can help me with a link!!!!! thanx in advance (2 Replies)
Discussion started by: anwerreyaz
2 Replies

9. Solaris

What is the command to increase filesystem on solaris

I wanted to know what is the process or command to increase a filesystem on solaris. For example the /tmp directory. (3 Replies)
Discussion started by: strikelit
3 Replies

10. Filesystems, Disks and Memory

What filesystem does unix use?

And what program can i use to make a unix format? (6 Replies)
Discussion started by: Dark Chrono
6 Replies
Login or Register to Ask a Question