- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: create a huge file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 07:21 AM
тАО11-14-2007 07:21 AM
I am trying to test monitoring and need to fill up a filesystem.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 07:28 AM
тАО11-14-2007 07:28 AM
Re: create a huge file
To create a 5 GB file:
# dd if=/dev/zero of=bigfile bs=1m count=5000
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 07:29 AM
тАО11-14-2007 07:29 AM
Re: create a huge file
dd if=/dev/zero of=/yourfs/tmp.tmp bs=1024k count=1000
will create 1GB file. you can flay with count and get desired file.
Hasan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 07:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 07:33 AM
тАО11-14-2007 07:33 AM
Re: create a huge file
One way:
# perl -e 'open(FH,">",$ARGV[0]);seek(FH,1024*1024,1);print FH "\n"' filename
This will create a file of 1 MiB characters with a name of your choice ("filename"). Change the value to whatever you want.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 11:47 PM
тАО11-14-2007 11:47 PM
Re: create a huge file
this will (probably) create a sparse file and will not fill up the filesystem.
Use prealloc to allocate a file with all zero's in it!
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 11:58 PM
тАО11-14-2007 11:58 PM
Re: create a huge file
> Armin: James, this will (probably) create a sparse file and will not fill up the filesystem.
Ah, yes, you are correct. I glossed over the part about wanting to fill up the filesystem.
If you choose to create the sparese file, as I suggested, you can inflate it by doing a simply copying it with 'cp' as you would any file.
Armin, that's for pointing this out.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2007 01:04 AM
тАО11-15-2007 01:04 AM
Re: create a huge file
prealloc test.100mb 102400000
creates a 100MB file.
Rgds...Geoff