I am on a Ubuntu machine.I have make a directory under root directory, by:$ sudo mkdir /hello$ sudo mkdir /hello/byeThen 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 -aIn future , How to clear /hello/bye (tmpfs) ?
clear tmpfs in my case
linux;shell;ubuntu;command line;shell script
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/byeHaving put the linetmpfs   /hello/bye   tmpfs   size=1024M,mode=0777  0  0in 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  0If you don't need the partition any more, simply delete that line from /etc/fstab and delete the directory /hello/bye.