Adding directory entries to /tmp direcotory

Need to modify/add directory entries of the /tmp based tmpfs directory that is mounted during the boot up ,
Can you share some pointers on how it is possible ?

Depends what those directories are ?

Be aware that /tmp (and tmpfs) is in RAM, so the contents will vanish upon reboot/power off.

You can create a script and add it to /etc/rc.local
The contents of the script would be something to the affect of:

mkdir /tmp/<directory_name>
mv /tmp/<dir_to_be_moved> /tmp/<new_dir_name>

Keep in mind that moving/renaming standard directories that are configured by the system during bootup will likely break things badly.

1 Like