sparse files from shell [Re: file size different from ls to du]

From: Dmitry Morozovsky (marck_at_rinet.ru)
Date: 07/30/03

  • Next message: Kris Kennaway: "Re: sparse files from shell [Re: file size different from ls to du]"
    Date: Wed, 30 Jul 2003 09:14:25 +0400 (MSD)
    To: Joshua Oreman <oremanj@www.get-linux.org>
    
    

    On Tue, 29 Jul 2003, Joshua Oreman wrote:

    [snip]

    JO> Usually programs will manage their own sparse files; it's something hard
    JO> to do at the shell.

    dd is your friend.

    These commands make sparse file of some ks physical and 1g logical:

    VNFILE=/tmp/sparsefile
    VNSZ=$((1024*1024))
    dd if=/dev/zero of=${VNFILE} bs=1k count=1 seek=$((${VNSZ} - 1))

    Sincerely,
    D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
    ------------------------------------------------------------------------
    *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
    ------------------------------------------------------------------------
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Kris Kennaway: "Re: sparse files from shell [Re: file size different from ls to du]"

    Relevant Pages