Quick file allocation
Hi All, Just wondered on FreeBSD is there a way that I can quickly create a file. When I mean quick I basically mean that the system just says that ok this file is allocataed inodes foo-bar rather than having to use mkfile 1G filename. Something like XFS's holey file support Rgds Rus -- www: http://jvds.com | Virtual Servers from just $15/mo MSNM: [EMAIL PROTECTED] | Totally Customizable Technology e: [EMAIL PROTECTED] | FreeBSD Linux 10% donation to FreeBSD.org on each purchase ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Quick file allocation
On Thu, Jul 24, 2003 at 01:11:14PM -0700 or thereabouts, Rus Foster wrote: Hi All, Just wondered on FreeBSD is there a way that I can quickly create a file. When I mean quick I basically mean that the system just says that ok this file is allocataed inodes foo-bar rather than having to use mkfile 1G filename. Something like XFS's holey file support open file seek 1G in write one zero byte close file Presto... sparse (AKA holey, not holy :-) file. -- Josh Rgds Rus -- www: http://jvds.com | Virtual Servers from just $15/mo MSNM: [EMAIL PROTECTED] | Totally Customizable Technology e: [EMAIL PROTECTED] | FreeBSD Linux 10% donation to FreeBSD.org on each purchase ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Quick file allocation
touch filename ??? Peter At 01:11 PM 7/24/2003 -0700, you wrote: Hi All, Just wondered on FreeBSD is there a way that I can quickly create a file. When I mean quick I basically mean that the system just says that ok this file is allocataed inodes foo-bar rather than having to use mkfile 1G filename. Something like XFS's holey file support Rgds Rus -- www: http://jvds.com | Virtual Servers from just $15/mo MSNM: [EMAIL PROTECTED] | Totally Customizable Technology e: [EMAIL PROTECTED] | FreeBSD Linux 10% donation to FreeBSD.org on each purchase ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Peter Elsner [EMAIL PROTECTED] Vice President Of Customer Service (And System Administrator) 1835 S. Carrier Parkway Grand Prairie, Texas 75051 (972) 263-2080 - Voice (972) 263-2082 - Fax (972) 489-4838 - Cell Phone ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Quick file allocation
On Thu, 24 Jul 2003, Peter Elsner wrote: touch filename ??? Peter Hi, Not quite as I want to allocate space rather than just the file. Thanks anyway Rgds Rus -- www: http://jvds.com | Virtual Servers from just $15/mo MSNM: [EMAIL PROTECTED] | Totally Customizable Technology e: [EMAIL PROTECTED] | FreeBSD Linux 10% donation to FreeBSD.org on each purchase ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Quick file allocation
fd = open(name, O_WRONLY); lseek(fd, size_in_bytes, SEEK_SET) close(fd) --Ugen Rus Foster wrote: On Thu, 24 Jul 2003, Peter Elsner wrote: touch filename ??? Peter Hi, Not quite as I want to allocate space rather than just the file. Thanks anyway Rgds Rus ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Quick file allocation
On Thu, Jul 24, 2003 at 01:11:14PM -0700, Rus Foster wrote: Hi All, Just wondered on FreeBSD is there a way that I can quickly create a file. When I mean quick I basically mean that the system just says that ok this file is allocataed inodes foo-bar rather than having to use mkfile 1G filename. Something like XFS's holey file support Rgds Rus -- www: http://jvds.com | Virtual Servers from just $15/mo MSNM: [EMAIL PROTECTED] | Totally Customizable Technology e: [EMAIL PROTECTED] | FreeBSD Linux 10% donation to FreeBSD.org on each purchase ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] end of the original message I'm not sure I've understood you completly. Anyway, to create files of arbitrary size you can use the program truncate. For example, to create a 1GB file named test with truncate: # truncate -s1G test # ls -l test -rw-r--r-- 1 root wheel 1073741824 Jul 24 23:55 test For more information: read truncate(1) manpage. You may also want to take a look at dd (read dd(1) manpage). Francesco Casadei -- You can download my public key from http://digilander.libero.it/fcasadei/ or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...) Key fingerprint is: 1671 9A23 ACB4 520A E7EE 00B0 7EC3 375F 164E B17B pgp0.pgp Description: PGP signature