using a file for swap space?

Martijn van Oosterhout kleptog at
Mon Apr 1 16:40:18 EST 2002

On Mon, Apr 01, 2002 at 04:19:14PM +1000, Simon Burton wrote:


> have net connection. There is not much
> room to move, and short of sticking the HD
> in a bigger machine, where can i find some
> swap? in a file? seems i want opposite of
> ramdisk, ie. diskram :)

Yes, you can swap to a file. Use dd if=/dev/zero count=<blocks> bs=<blocksize>
to create the file and then specify it instead of a partition.

Martijn van Oosterhout <kleptog at>
> Ignorance continues to thrive when intelligent people choose to do
> nothing.  Speaking out against censorship and ignorance is the imperative
> of all intelligent people.

More information about the linux mailing list