EnglishFrenchSpanish

OnWorks favicon

fallocate - Online in the Cloud

Run fallocate in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command fallocate that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


fallocate - preallocate or deallocate space to a file

SYNOPSIS


fallocate [-c] [-n] [-p] [-z] [-o offset] -l length filename

fallocate -d [-o offset] [-l length] filename

DESCRIPTION


fallocate is used to manipulate the allocated disk space for a file, either to deallocate
or preallocate it. For filesystems which support the fallocate system call, preallocation
is done quickly by allocating blocks and marking them as uninitialized, requiring no IO to
the data blocks. This is much faster than creating a file by filling it with zeros.

The exit code returned by fallocate is 0 on success and 1 on failure.

OPTIONS


The length and offset arguments may be followed by the multiplicative suffixes KiB
(=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB
(=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.

The options --collapse-range, --dig-holes, --punch-hole and --zero-range are mutually
exclusive.

-c, --collapse-range
Removes a byte range from a file, without leaving a hole. The byte range to be
collapsed starts at offset and continues for length bytes. At the completion of
the operation, the contents of the file starting at the location offset+length will
be appended at the location offset, and the file will be length bytes smaller. The
option --keep-size may not be specified for colapse range operation.

Available since Linux 3.15 for ext4 (only for extent-based files) and XFS.

-d, --dig-holes
Detect and dig holes. This makes the file sparse in-place, without using extra
disk space. The minimum size of the hole depends on filesystem I/O block size
(usually 4096 bytes). Also, when using this option, --keep-size is implied. If no
range is specified by --offset and --length, then the entire file is analyzed for
holes.

You can think of this option as doing a "cp --sparse" and then renaming the
destination file to the original, without the need for extra disk space.

See --punch-hole for a list of supported filesystems.

-l, --length length
Specifies the length of the range, in bytes.

-n, --keep-size
Do not modify the apparent length of the file. This may effectively allocate
blocks past EOF, which can be removed with a truncate.

-o, --offset offset
Specifies the beginning offset of the range, in bytes.

-p, --punch-hole
Deallocates space (i.e., creates a hole) in the byte range starting at offset and
continuing for length bytes. Within the specified range, partial filesystem blocks
are zeroed, and whole filesystem blocks are removed from the file. After a
successful call, subsequent reads from this range will return zeroes. This option
may not be specified at the same time as the --zero-range option. Also, when
using this option, --keep-size is implied.

Supported for XFS (since Linux 2.6.38), ext4 (since Linux 3.0), Btrfs (since Linux
3.7) and tmpfs (since Linux 3.5).

-v, --verbose
Enable verbose mode.

-z, --zero-range
Zeroes space in the byte range starting at offset and continuing for length bytes.
Within the specified range, blocks are preallocated for the regions that span the
holes in the file. After a successful call, subsequent reads from this range will
return zeroes.

Zeroing is done within the filesystem preferably by converting the range into
unwritten extents. This approach means that the specified range will not be
physically zeroed out on the device (except for partial blocks at the either end of
the range), and I/O is (otherwise) required only to update metadata.

Option --keep-size can be specified to prevent file length modification.

Available since Linux 3.14 for ext4 (only for extent-based files) and XFS.

-V, --version
Display version information and exit.

-h, --help
Display help text and exit.

AUTHORS


Eric Sandeen ⟨[email protected]
Karel Zak ⟨[email protected]

Use fallocate online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 2
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 3
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • 4
    eSpeak: speech synthesis
    eSpeak: speech synthesis
    Text to Speech engine for English and
    many other languages. Compact size with
    clear but artificial pronunciation.
    Available as a command-line program with
    many ...
    Download eSpeak: speech synthesis
  • 5
    Sky Chart / Cartes du Ciel
    Sky Chart / Cartes du Ciel
    SkyChart is a software to draw chart of
    the night sky for the amateur astronomer
    from a bunch of stars and nebulae
    catalogs. See main web page for full
    download...
    Download Sky Chart / Cartes du Ciel
  • 6
    GSmartControl
    GSmartControl
    GSmartControl is a graphical user
    interface for smartctl. It allows you to
    inspect the hard disk and solid-state
    drive SMART data to determine its
    health, as w...
    Download GSmartControl
  • More »

Linux commands

  • 1
    abc2abc
    abc2abc
    abc2abc - a simple abc
    checker/re-formatter/transposer ...
    Run abc2abc
  • 2
    abc2ly
    abc2ly
    abc2ly - manual page for abc2ly
    (LilyPond) 2.18.2 ...
    Run abc2ly
  • 3
    coqmktop
    coqmktop
    coqmktop - The Coq Proof Assistant
    user-tactics linker ...
    Run coqmktop
  • 4
    coqtop
    coqtop
    coqtop - The Coq Proof Assistant
    toplevel system ...
    Run coqtop
  • 5
    g.copygrass
    g.copygrass
    g.copy - Copies available data files in
    the current mapset search path to the
    user�s current mapset. KEYWORDS:
    general, map management ...
    Run g.copygrass
  • 6
    g.dirsepsgrass
    g.dirsepsgrass
    g.dirseps - Internal GRASS utility for
    converting directory separator
    characters. Converts any directory
    separator characters in the input string
    to or from na...
    Run g.dirsepsgrass
  • More »

Ad