"touch" a new file of specified size
From: Douglas Mayne (doug_at_SLACKWARE-1.localnet)
Date: 07/31/05
- Next message: General Schvantzkoph: "Re: Dual Core Support in WBEL"
- Previous message: Michael Black: "Re: The Linux Revolution: What Happened?"
- Next in thread: Peter T. Breuer: "Re: "touch" a new file of specified size"
- Reply: Peter T. Breuer: "Re: "touch" a new file of specified size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Jul 2005 11:19:23 -0600
I know I can quickly create a new file using touch, but is there a quick
way to create a new file of a specific size?
When I use dd as shown below, it takes a long time to create the file
because there is a write operation required for every byte in the file:
dd if=/dev/zero of=some_new_file bs=1024 count=8000000
Is there a way to allocate a file of the same size and not
performing any initialization? I know the resulting allocation might
contain random or junk data, but that's ok.
TIA...
- Next message: General Schvantzkoph: "Re: Dual Core Support in WBEL"
- Previous message: Michael Black: "Re: The Linux Revolution: What Happened?"
- Next in thread: Peter T. Breuer: "Re: "touch" a new file of specified size"
- Reply: Peter T. Breuer: "Re: "touch" a new file of specified size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|