Sample Header Ad - 728x90

How is /tmp linked to /var/tmp

2 votes
1 answer
1217 views
I've already read up on the differences between /tmp and /var/tmp, so note that this is not what this question is about. When I create a file in /tmp, it shows up in /var/tmp; however, neither directory shows as a sym-link of the other: [root@l12662 /]# pwd; ll / total 32 lrwxrwxrwx. 1 root root 7 Aug 25 2017 bin -> usr/bin dr-xr-xr-x. 4 root root 4096 Aug 25 2017 boot drwxr-xr-x 21 root root 3560 Nov 18 23:32 dev ... drwxrwxrwt. 27 root root 4096 Nov 24 08:18 tmp ... [root@l12662 /]# cd /var [root@l12662 var]# ll total 12 drwxr-xr-x. 2 root root 19 Mar 28 2017 account drwxr-xr-x. 2 root root 6 Mar 10 2016 adm drwxr-xr-x. 10 root root 122 Aug 25 2017 cache ... drwxrwxrwt. 27 root root 4096 Nov 24 08:18 tmp ... How are they linked: [root@l12662 tmp]# pwd; ls | grep test /tmp [root@l12662 tmp]# ls /var/tmp/ | grep test [root@l12662 tmp]# pwd; touch test.me /tmp [root@l12662 tmp]# pwd; ls | grep test /tmp test.me [root@l12662 tmp]# ls /var/tmp/ | grep test test.me [root@l12662 tmp]# This is RHEL 7, btw: [root@l12662 tmp]# cat /etc/*release NAME="Red Hat Enterprise Linux Server" VERSION="7.4 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.4" PRETTY_NAME="Red Hat Enterprise Linux Server 7.4 (Maipo)"
Asked by JayRugMan (126 rep)
Nov 24, 2021, 03:25 PM
Last activity: Nov 24, 2021, 03:39 PM