<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Comandos_de_la_terminal%2Ffallocate</id>
	<title>Comandos de la terminal/fallocate - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Comandos_de_la_terminal%2Ffallocate"/>
	<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Comandos_de_la_terminal/fallocate&amp;action=history"/>
	<updated>2026-05-10T01:20:26Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>http://wiki.cabal.mx/index.php?title=Comandos_de_la_terminal/fallocate&amp;diff=5642&amp;oldid=prev</id>
		<title>Rrc en 14:41 7 ago 2014</title>
		<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Comandos_de_la_terminal/fallocate&amp;diff=5642&amp;oldid=prev"/>
		<updated>2014-08-07T14:41:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
* [[:#fallocate | fallocate]]&lt;br /&gt;
&lt;br /&gt;
== fallocate ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# fallocate --help&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 fallocate [options] &amp;lt;filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -n, --keep-size     don&amp;#039;t modify the length of the file&lt;br /&gt;
 -p, --punch-hole    punch holes in the file&lt;br /&gt;
 -o, --offset &amp;lt;num&amp;gt;  offset of the allocation, in bytes&lt;br /&gt;
 -l, --length &amp;lt;num&amp;gt;  length of the allocation, in bytes&lt;br /&gt;
&lt;br /&gt;
 -h, --help     display this help and exit&lt;br /&gt;
 -V, --version  output version information and exit&lt;br /&gt;
&lt;br /&gt;
For more details see fallocate(1).&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# fallocate --version&lt;br /&gt;
fallocate from util-linux 2.24&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# umount /dev/sdc1&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# fdisk /dev/sdc&lt;br /&gt;
&lt;br /&gt;
Welcome to fdisk (util-linux 2.24).&lt;br /&gt;
Changes will remain in memory only, until you decide to write them.&lt;br /&gt;
Be careful before using the write command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command (m for help): p&lt;br /&gt;
Disk /dev/sdc: 7.5 GiB, 8024752128 bytes, 15673344 sectors&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: gpt&lt;br /&gt;
Disk identifier: C5DD38DB-930E-493E-AA4A-2B9AEFFA7B8C&lt;br /&gt;
&lt;br /&gt;
Device    Start          End   Size Type&lt;br /&gt;
/dev/sdc1  2048     15673310   7.5G Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (m for help): d&lt;br /&gt;
&lt;br /&gt;
Selected partition 1&lt;br /&gt;
Partition 1 has been deleted.&lt;br /&gt;
&lt;br /&gt;
Command (m for help): p&lt;br /&gt;
Disk /dev/sdc: 7.5 GiB, 8024752128 bytes, 15673344 sectors&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: gpt&lt;br /&gt;
Disk identifier: C5DD38DB-930E-493E-AA4A-2B9AEFFA7B8C&lt;br /&gt;
&lt;br /&gt;
Command (m for help): o&lt;br /&gt;
&lt;br /&gt;
Created a new DOS disklabel with disk identifier 0x1c37a385.&lt;br /&gt;
&lt;br /&gt;
Command (m for help): p&lt;br /&gt;
Disk /dev/sdc: 7.5 GiB, 8024752128 bytes, 15673344 sectors&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x1c37a385&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&lt;br /&gt;
&lt;br /&gt;
Partition type:&lt;br /&gt;
   p   primary (0 primary, 0 extended, 4 free)&lt;br /&gt;
   e   extended&lt;br /&gt;
Select (default p): p&lt;br /&gt;
Partition number (1-4, default 1): 1&lt;br /&gt;
First sector (2048-15673343, default 2048): &lt;br /&gt;
Last sector, +sectors or +size{K,M,G,T,P} (2048-15673343, default 15673343): &lt;br /&gt;
&lt;br /&gt;
Created a new partition 1 of type &amp;#039;Linux&amp;#039; and of size 7.5 GiB.&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&lt;br /&gt;
The partition table has been altered.&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# mkfs -t xfs /dev/sdc1&lt;br /&gt;
mkfs.xfs: /dev/sdc1 appears to contain a partition table (DOS).&lt;br /&gt;
mkfs.xfs: Use the -f option to force overwrite.&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# mkfs -t xfs -f /dev/sdc1&lt;br /&gt;
meta-data=/dev/sdc1              isize=256    agcount=4, agsize=489728 blks&lt;br /&gt;
         =                       sectsz=512   attr=2, projid32bit=0&lt;br /&gt;
data     =                       bsize=4096   blocks=1958912, imaxpct=25&lt;br /&gt;
         =                       sunit=0      swidth=0 blks&lt;br /&gt;
naming   =version 2              bsize=4096   ascii-ci=0&lt;br /&gt;
log      =internal log           bsize=4096   blocks=2560, version=2&lt;br /&gt;
         =                       sectsz=512   sunit=0 blks, lazy-count=1&lt;br /&gt;
realtime =none                   extsz=4096   blocks=0, rtextents=0&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# mount -t auto /dev/sdc1 /mnt&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# mount&lt;br /&gt;
proc on /proc type proc (rw,relatime)&lt;br /&gt;
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)&lt;br /&gt;
devtmpfs on /dev type devtmpfs (rw,nosuid,size=6123732k,nr_inodes=1530933,mode=755)&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
/dev/sda3 on /home type ext4 (rw,noatime,data=ordered)&lt;br /&gt;
/dev/sdc1 on /mnt type xfs (rw,relatime,attr2,inode64,noquota)&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# fallocate --length 2GiB /mnt/swapfile&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al /mnt&lt;br /&gt;
total 2097156&lt;br /&gt;
drwxr-xr-x  2 root root         21 Aug  7 09:38 ./&lt;br /&gt;
drwxr-xr-x 20 root root       4096 Aug  7 06:39 ../&lt;br /&gt;
-rw-r--r--  1 root root 2147483648 Aug  7 09:38 swapfile&lt;br /&gt;
&lt;br /&gt;
Debe usar el comando mkswap para iniciarlo y swapon para activarlo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Comandos de la terminal]]&lt;/div&gt;</summary>
		<author><name>Rrc</name></author>
		
	</entry>
</feed>