Find all cache folders and put it in ramdisk [ SOLVED]

Forum rules
Before you post please read how to get help
Post Reply
User avatar
mire000
Level 1
Level 1
Posts: 43
Joined: Wed May 22, 2019 5:31 am

Find all cache folders and put it in ramdisk [ SOLVED]

Post by mire000 »

Can someone help?

I need to list all folders with name "cache" in ~/ folder and put all that folders on RAMDISK.

I tried this, but it didnt't work:

sudo find ~/ -type d -name 'cache' -exec mount -t tmpfs -o size=200m tmpfs {} +

-----------------------------------------------------------------------------------------------------------------------------------
EDIT:

It's my mistake:

To mount:
sudo find ~/ -type d -name 'cache' -exec mount -t tmpfs -o size=1000m tmpfs {} \;

To unmount:
sudo find ~/ -type d -name 'cache' -exec umount -f {} \;

I will close thread as Solved.
Post Reply

Return to “Scripts & Bash”