clear tmpfs in my case
26,248
If by clear
you mean delete all files in there, it's like any other directory:
rm -rf /hello/bye/*
If you mean unmount the tmpfs partition simply do:
umount /hello/bye
Having put the line
tmpfs /hello/bye tmpfs size=1024M,mode=0777 0 0
in your /etc/fstab
, that partition will be automatically mounted at every boot. If you don't want to automout use the noauto
option:
tmpfs /hello/bye tmpfs size=1024M,mode=0777,noauto 0 0
If you don't need the partition any more, simply delete that line from /etc/fstab
and delete the directory /hello/bye
.
Related videos on Youtube
Author by
Mellon
Updated on September 18, 2022Comments
-
Mellon over 1 year
I am on a Ubuntu machine.
I have make a directory under root directory, by:
$ sudo mkdir /hello $ sudo mkdir /hello/bye
Then I mount tmpfs with size 1024M to
/hello/bye
by:$ sudo echo "tmpfs /hello/bye tmpfs size=1024M,mode=0777 0 0" >> /etc/fstab $ sudo mount -a
In future , How to clear
/hello/bye
(tmpfs) ?-
Hanan N. over 12 yearsWhat is mean "to clrear" ?
-