resizing a file

resizing a file

Post by Shane Ke » Sun, 26 Dec 1993 05:52:33



No flames please.

Is there a system call to truncate a file to a specified length?
Replies by e-mail preferred.

Many thanks from your ignorant servant,
kerr

 
 
 

resizing a file

Post by Axel-Stephane C. Sm?rgr » Sun, 26 Dec 1993 20:53:00



> No flames please.

> Is there a system call to truncate a file to a specified length?
> Replies by e-mail preferred.

> Many thanks from your ignorant servant,
> kerr

Take a look at

        man 1 split

It might solve your problem.

Axel-Stephane Smorgrav
   Oslo, Norway

 
 
 

resizing a file

Post by Ed Fa » Wed, 29 Dec 1993 17:18:38



>No flames please.

>Is there a system call to truncate a file to a specified length?
>Replies by e-mail preferred.

And the answer is ... (envelope please) ... truncate!

See the truncate(2) man page for more info.

--
                -ed falk, sun microsystems

        "Towards the end, the smell of their air began to change"

 
 
 

resizing a file

Post by John Chambe » Tue, 11 Jan 1994 09:49:09




> >No flames please.

> >Is there a system call to truncate a file to a specified length?
> >Replies by e-mail preferred.

> And the answer is ... (envelope please) ... truncate!

> See the truncate(2) man page for more info.

Don't look now, but code that uses truncate() isn't  portable.   There
are  still  some Unices extant that don't have it.  I was working on a
Sys/VR3 machine just a while back, and this was  one  of  many  things
that  bit  me.   Sys/VR4  has  it, but R3 doesn't (unless a particular
vendor has added it).

Ain't standards wunnerful?

--
Verbosity leads to unclear, inarticulate things.
   -- Dan Quayle

 
 
 

resizing a file

Post by Matthew J Bro » Wed, 12 Jan 1994 21:37:12





>> >No flames please.
>> >Is there a system call to truncate a file to a specified length?
>> >Replies by e-mail preferred.
>> And the answer is ... (envelope please) ... truncate!
>> See the truncate(2) man page for more info.
> Don't look now, but code that uses truncate() isn't  portable.   There
> are  still  some Unices extant that don't have it.  I was working on a
> Sys/VR3 machine just a while back, and this was  one  of  many  things
> that  bit  me.   Sys/VR4  has  it, but R3 doesn't (unless a particular
> vendor has added it).

Personally I'd just use truncate(2) and to hell with unportability.
Every sane modern UNIX has it, and I personally think we (UNIX
programmers) are too concerned about portability to antique strains of
UNIX.  You can stick to V7 portability if you want, but I'm not; IMHO
overdoing the portability encourages people to stick with versions of
UNIX that long ago should have been taken out and shot.  The only way
we're going to see wide acceptance of standards is if we write
programs that require at least some standards-conformance.

-Morven

--

\  __/___  Dept of Computing, Imperial College, 180 Queens Gate, London SW7 2AZ
 \ \/   /  45 Ollgar Close, Shepherd's Bush, London W12 0NG -- Tel 081-740 0271
  \/\  /   --------------------------------------------------------------------
     \/    |____________Apathy rules  --  when it can be bothered.____________|

 
 
 

1. Resizing desktop when resizing X mode

Is it possible to resize my desktop when switching modes with X.
I normally use an 1280x1024 mode, but when i turn to TV-out the max my
card supports is 1024x786, but then my desktop is lager than my mode and I
disslike this.....
Can I have my desktop resized aswell as my mode, on-the-fly?

Luke

2. Why different eject ioctl()s on different devices

3. Resize a file

4. Microsoft destroys TPC-C records!

5. How to resize existing file systems / slices ?

6. USB 2.0 PCI cards

7. how to resize file system

8. HELP - 2nd Post - Linux 1.2.13 ramdisk

9. Database file resizing??

10. Resize the swap file?

11. resize LUN no file system yet

12. Resizing File system AIX 3.2.5

13. how to resize an open file