Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ??

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 12-02-2012
razolo13 razolo13 is offline
Registered User
Join Date: Nov 2012
Last Activity: 4 December 2012, 6:01 AM EST
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ??

Hello guys. I really hope someone will help me with this one..

So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will be:
- X bytes of 0
- Y bytes of random data
- Z bytes of 1
- T bytes of 5
So, totally, the file's size, /mnt/partition/data will be X+Y+Z+T, where X,Y,Z,Y are parameters.

The big problem is with the XZTY bytes. I dont know how to make a file with X bytes of 0, Y bytes of random data, and so on.. Also how can I make a file ext3?
Sponsored Links
Old Unix and Linux 12-02-2012
Scrutinizer's Unix or Linux Image
Scrutinizer Scrutinizer is offline Forum Staff  
Join Date: Nov 2008
Last Activity: 22 September 2017, 3:26 PM EDT
Location: Amsterdam
Posts: 11,534
Thanks: 500
Thanked 3,335 Times in 2,943 Posts
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Copying 1024 bytes data in 3-bytes chunk royalibrahim Programming 3 04-13-2011 02:32 PM
Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes) elamurugu Shell Programming and Scripting 1 12-13-2010 02:33 PM
Printing bytes ahmedwaseem2000 Shell Programming and Scripting 12 05-26-2010 09:31 AM
Command to ping 1500 bytes of data to a destination system rvan IP Networking 2 11-16-2009 05:08 AM
Remove first N bytes and last N bytes from a binary file on AIX. naveendronavall Shell Programming and Scripting 1 05-24-2008 11:06 AM

All times are GMT -4. The time now is 06:18 PM.