X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ?? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

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

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 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
    #2  
Old 12-02-2012
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 21 April 2014, 5:25 AM EDT
Location: Amsterdam
Posts: 8,878
Thanks: 230
Thanked 2,141 Times in 1,922 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
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:04 AM.