- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to create a specific size file?like,solaris:m...
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
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
тАО07-10-2003 06:20 PM
тАО07-10-2003 06:20 PM
How to create a specific size file?like,solaris:mkfile. thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 06:40 PM
тАО07-10-2003 06:40 PM
Re: How to create a specific size file?like,solaris:mkfile. thanks.
Do u mean to create a file with a specific size, then u can use prealloc command.
This command creates a file in bytes.
For instance,
prealloc test 1024 --> to create one kb file by name test.
ATB,
Sudhakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 06:44 PM
тАО07-10-2003 06:44 PM
Re: How to create a specific size file?like,solaris:mkfile. thanks.
However, the file size you specify with prealloc is in BYTES, not KB, not MB, just plain old BYTES.
So, if you do:
# prealloc test 1024
You will get a 1024 BYTE file.
If you want to create a 1 MB file, you need to do:
# prealloc test 1048576
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 07:27 PM
тАО07-10-2003 07:27 PM
Re: How to create a specific size file?like,solaris:mkfile. thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 07:54 PM
тАО07-10-2003 07:54 PM
Re: How to create a specific size file?like,solaris:mkfile. thanks.
1. The free space in the disk must large than the specific size;
2. If the "file" exists and not zero, the prealloc will fail;
3. Usually make a script to use prealloc, if "file" exists and not zero, empty it first; or if the free space is not enough , make a warning and exit.
BTW, please assign points to whom really help you!
-ux