AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  /var/tmp - what is it and how to clean it up?

    Posted Tue March 09, 2021 05:48 AM
    Hello.
    On one of my systems I can find a lot of subdirs in /var/tmp. Names of them are similar to rpm packages:
    # ls -la /var/tmp | head -30
    total 536
    drwxrwxrwt 84 bin bin 8192 Mar 09 10:35 .
    drwxr-xr-x 39 bin bin 4096 Mar 21 2020 ..
    drwxrwxrwt 2 root system 256 Feb 22 2011 .oracle
    drwxr-xr-x 2 root system 256 Apr 16 2018 AIX-rpm-6.1.8.15-4
    -rw-r--r-- 1 root system 0 Apr 07 2012 DS4900cudv.out
    -rw-r--r-- 1 root system 0 Apr 07 2012 DS5100cudv.out
    -rw-r--r-- 1 root system 0 Apr 07 2012 DS5300cudv.out
    -rw------- 1 209 ictest 0 Sep 13 2013 Ex01300
    -rw-r--r-- 1 root system 18122 Mar 21 2020 aixmibd.log
    drwxr-xr-x 4 root system 256 Apr 16 2018 apr-1.6.3-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 apr-util-1.5.4-3
    drwxr-xr-x 3 root system 256 Apr 16 2018 apr-util-ldap-1.5.4-3
    drwxr-xr-x 4 root system 256 Apr 16 2018 autoconf-2.69-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 automake-1.14-1
    -rw-r--r-- 1 root system 388 Mar 20 2016 b315506714101604.log
    drwxr-xr-x 5 root system 256 Apr 16 2018 bash-4.3-12
    drwxr-xr-x 4 root system 256 Apr 16 2018 binutils-2.14-3
    drwxr-xr-x 4 root system 256 Apr 16 2018 bzip2-1.0.6-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 coreutils-8.23-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 curl-7.27.0-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 db4-4.8.30-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 expat-2.2.5-1
    drwxr-xr-x 2 root system 256 Apr 16 2018 expect-5.42.1-3
    drwxr-xr-x 4 root system 256 Apr 16 2018 findutils-4.4.2-3
    drwxr-xr-x 4 root system 256 Apr 16 2018 fontconfig-2.8.0-2
    drwxr-xr-x 4 root system 256 Apr 16 2018 freetype2-2.8.1-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 gcc-4.8.1-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 gcc-c++-4.8.1-1
    drwxr-xr-x 4 root system 256 Apr 16 2018 gcc-cpp-4.8.1-1

    If I enter e.g. to curl-7.27.0-1 dir and print its contents, it's like this:

    # ls -laR
    total 16
    drwxr-xr-x 4 root system 256 Apr 16 2018 .
    drwxrwxrwt 84 bin bin 8192 Mar 09 10:35 ..
    drwxr-xr-x 3 root system 256 Apr 16 2018 opt
    drwxr-xr-x 4 root system 256 Apr 16 2018 usr
    ./opt:
    total 0
    drwxr-xr-x 3 root system 256 Apr 16 2018 .
    drwxr-xr-x 4 root system 256 Apr 16 2018 ..
    drwxr-xr-x 6 root system 256 Apr 16 2018 freeware

    ./opt/freeware:
    total 0
    drwxr-xr-x 6 root system 256 Apr 16 2018 .
    drwxr-xr-x 3 root system 256 Apr 16 2018 ..
    drwxr-xr-x 2 root system 256 Apr 16 2018 bin
    drwxr-xr-x 3 root system 256 Apr 16 2018 doc
    drwxr-xr-x 2 root system 256 Apr 16 2018 lib
    drwxr-xr-x 3 root system 256 Apr 16 2018 man

    ./opt/freeware/bin:
    total 296
    drwxr-xr-x 2 root system 256 Apr 16 2018 .
    drwxr-xr-x 6 root system 256 Apr 16 2018 ..
    -rwxr-xr-x 1 root system 151243 Aug 29 2012 curl

    ./opt/freeware/doc:
    total 8
    drwxr-xr-x 3 root system 256 Apr 16 2018 .
    drwxr-xr-x 6 root system 256 Apr 16 2018 ..
    drwxr-xr-x 2 root system 4096 Apr 16 2018 curl-7.27.0

    ./opt/freeware/doc/curl-7.27.0:
    total 704
    drwxr-xr-x 2 root system 4096 Apr 16 2018 .
    drwxr-xr-x 3 root system 256 Apr 16 2018 ..
    -rw-r--r-- 1 root system 6044 Jul 20 2012 BUGS
    -rw-r--r-- 1 root system 181955 Jul 27 2012 CHANGES
    -rw-r--r-- 1 root system 1044 Apr 25 2012 COPYING
    -rw-r--r-- 1 root system 59952 Jul 20 2012 FAQ
    -rw-r--r-- 1 root system 3904 Jul 20 2012 FEATURES
    -rw-r--r-- 1 root system 36700 Jul 20 2012 MANUAL
    -rw-r--r-- 1 root system 1607 Mar 19 2011 README
    -rw-r--r-- 1 root system 2287 Mar 19 2011 RESOURCES
    -rw-r--r-- 1 root system 21874 Jun 03 2012 TODO
    -rw-r--r-- 1 root system 21751 Mar 19 2011 TheArtOfHttpScripting

    ./opt/freeware/lib:
    total 2856
    drwxr-xr-x 2 root system 256 Apr 16 2018 .
    drwxr-xr-x 6 root system 256 Apr 16 2018 ..
    -rwxr-xr-x 1 root system 1458798 Aug 29 2012 libcurl.a

    ./opt/freeware/man:
    total 0
    drwxr-xr-x 3 root system 256 Apr 16 2018 .
    drwxr-xr-x 6 root system 256 Apr 16 2018 ..
    drwxr-xr-x 2 root system 256 Apr 16 2018 man1

    ./opt/freeware/man/man1:
    total 176
    drwxr-xr-x 2 root system 256 Apr 16 2018 .
    drwxr-xr-x 3 root system 256 Apr 16 2018 ..
    -rw-r--r-- 1 root system 86027 Aug 29 2012 curl.1

    ./usr:
    total 0
    drwxr-xr-x 4 root system 256 Apr 16 2018 .
    drwxr-xr-x 4 root system 256 Apr 16 2018 ..
    drwxr-xr-x 2 root system 256 Apr 16 2018 bin
    drwxr-xr-x 2 root system 256 Apr 16 2018 lib

    ./usr/bin:
    total 0
    drwxr-xr-x 2 root system 256 Apr 16 2018 .
    drwxr-xr-x 4 root system 256 Apr 16 2018 ..
    lrwxrwxrwx 1 root system 27 Feb 11 2019 curl -> ../../opt/freeware/bin/curl

    ./usr/lib:
    total 0
    drwxr-xr-x 2 root system 256 Apr 16 2018 .
    drwxr-xr-x 4 root system 256 Apr 16 2018 ..
    lrwxrwxrwx 1 root system 32 Feb 11 2019 libcurl.a -> ../../opt/freeware/lib/libcurl.a



    What are these directories, files? Are they necessary? How can I clean this up?
    Thanks a lot in advance.

    ------------------------------
    Karol Ciesla
    ------------------------------


  • 2.  RE: /var/tmp - what is it and how to clean it up?

    Posted Tue March 09, 2021 11:54 PM
    Hi,
    My understanding is that files kept here for a more permanent storage than /tmp - some are important logs you may want to survive reboot and other rpm components.  Originally these files were in /usr/tmp, but as /usr can be read only for some configurations (diskless workstations etc), it is now a symbolic link to /var/tmp.  Thus I recommend leaving them there.

    However, I did notice that you are using very old versions and the later versions I am using install components under /opt by default.  A worthwhile exercise might be to download the latest versions from toolbox (https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS), remove your versions (confirming that /var/tmp is tidier), then install the new versions.
    Please let me know how it goes,
    Cheers,

    ------------------------------
    --------------------
    Antony Steel (Red)
    ===============
    ------------------------------