- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Script Help
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
тАО04-08-2007 03:14 AM
тАО04-08-2007 03:14 AM
I am trying to write a script that would be used to populate a file of the same size (approx 300K) onto a 1TB filesystem and then repeat the process until the filesystem is 100% filled.
I am not sure how to write the code for this at all.
Being that I am a newbie to this forum and linux in general as much help as you can provide here would be very much appreciated.
Thank you all and Happy Easter.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2007 05:14 AM
тАО04-08-2007 05:14 AM
Re: Script Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2007 05:53 AM
тАО04-08-2007 05:53 AM
Re: Script Help
COUNT=0
while true
do
dd if=/dev/zero of=file$COUNT bs=300k
COUNT=`expr $COUNT + 1`
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2007 11:57 AM
тАО04-08-2007 11:57 AM
Re: Script Help
I tried this script on my system and it builds one large file which is ok but what i am trying to do is build the same file size (300k or another size) and multiply it across the entire filesystem making millions of little files on a 1TB filesystem.
What should i do to the script you supplied in order to tweak it to the correct output i desire.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2007 04:39 PM
тАО04-08-2007 04:39 PM
Re: Script Help
But the issue does reside in the fact that you'll probably run out of inodes before you run out of space using 300k files. If so, use larger files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2007 05:55 PM
тАО04-08-2007 05:55 PM
Re: Script Help
What is the real objective here. Are you looking to wipe out the disk.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2007 01:26 AM
тАО04-09-2007 01:26 AM
SolutionCOUNT=0
while true
do
dd if=/dev/zero of=file$COUNT bs=300k count=1
COUNT=`expr $COUNT + 1`
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2007 08:39 AM
тАО04-09-2007 08:39 AM
Re: Script Help
Now just to add more to my confusion, i was told that they wanted to change this up a little bit so here goes what i need to do:
1) The application's output directory structure creates 100 directories called 00 thru 99.
2) since the filesystem size is 1TB and were using an output file size of 300K, if my math is correct that would equate out to about 3 million files for the whole filesystem.
3) based on #1 & #2, what i have to do now is take the script you provided me and let it write 30,000 files per directory while walking each directory and doing the same thing until it reaches the 99 directory.
Hope this is a simple thing for you cause it sure has me confused.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2007 12:25 PM
тАО04-09-2007 12:25 PM
Re: Script Help
Something like this...
LIMIT=100
for ((a=1; a <= LIMIT ; a++))
do
mkdir dir$a
cd "dir$a"
cd ..
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2007 12:47 PM
тАО04-09-2007 12:47 PM
Re: Script Help
What can i do to limit the number of files created to 30,000 total per directory thus giving me 3 million files total?
Thanks for the help, it is much appreciated.