- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script to create 1000 files of size 1kb each
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
Forums
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
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-21-2004 11:24 PM
тАО11-21-2004 11:24 PM
Thanks a lot in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2004 11:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2004 11:31 PM
тАО11-21-2004 11:31 PM
Re: Script to create 1000 files of size 1kb each
$ COUNTER=1
$ ORIG_FILE=
$ while [ $COUNTER -lt 1000 ]
do
cp $ORIG_FILE ${ORIG_FILE}_$COUNTER
COUNTER=$COUNTER+1
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2004 11:31 PM
тАО11-21-2004 11:31 PM
Re: Script to create 1000 files of size 1kb each
How about
# prealloc testfile 10000000
# split -b 10k testfile
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2004 11:32 PM
тАО11-21-2004 11:32 PM
Re: Script to create 1000 files of size 1kb each
dd if=/dev/zero bs=1024 count=1000 | split -b 1k -a 3 - test
:-)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2004 02:24 AM
тАО11-22-2004 02:24 AM
Re: Script to create 1000 files of size 1kb each
i=1
while [ i -le 1000 ]
do
prealloc file${i} 1024
let i=i+1
done
it will create files with file1.. file1000 with 1KB size
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2004 08:35 PM
тАО11-22-2004 08:35 PM
Re: Script to create 1000 files of size 1kb each
Thank you all for the support.
I used a perl script as below.
$i = 0;
for ($i =0;$i<1000;$i++){
$cmd = "echo test > testf" . $i ;
system($cmd);
}
I am closing this thread. Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2004 08:36 PM
тАО11-22-2004 08:36 PM