Questions tagged [tmp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Is there a way to redirect files that match a certain pattern to another directory?

Gnome libsoup is creating a ton of directories in /tmp on the form grilo-plugin-cache-*/ There's an open issue about it, but it has been open for two years, and the developer does not seem to agree ...
  • 512
1 vote
1 answer
68 views

Unable to delete root-owned file under /tmp

The file and folder are owned by root but I did sudo chmod ugo+rw on both, which I confirmed with ls -l. Still, I cannot remove the file as normal user. ❯ ls -ld /tmp /tmp/perm drwxrwxrwt 46 root root ...
  • 479
0 votes
1 answer
56 views

How to set up /var/tmp

This is a very stupid question but how can we set up /var/tmp? Is there a special way to do it or will just creating the directory suffice?
2 votes
1 answer
521 views

tmp on tmpfs: fstab vs tmp.mount with systemd

To have /tmp on tmpfs, I know I can use an entry in /etc/fstab, but I do not understand the role of /etc/default/tmpfs mentioned sometimes, and in what case I need to create or modify it. Recently, I ...
  • 1,758
1 vote
1 answer
72 views

Processes in tmp folder

I have an application that has a process on the /tmp folder, and the process creates another file or folder. If the original process gets ended by the application, will all the files created by it get ...
0 votes
0 answers
26 views

Fix Polyinstantiation of /tmp causing 'connect /tmp/.X11-unix/X0: No such file or directory'

In a multiseat desktop system with the /tmp directory polyinstantiated, the /tmp/.X11-unix/ directory and Xn instances are still created under root's /tmp not a user's. ssh -Ying into or out of the ...
  • 514
22 votes
4 answers
2k views

How can I copy a /tmp/ directory that is created & deleted by a process?

I am investigating the behavior of a binary on Oracle Linux 9 (XFS filesystem). This binary, when called by a process, creates a directory under /tmp and copies some files to it. This directory gets a ...
0 votes
1 answer
120 views

Can't mount zram device on /tmp (Booting problem)

I have a simple script that creates a zram device and formats it to ext4 and finally, it mounts zram on /tmp. #!/bin/bash # create zram with size 1.5G # $zram_dev is created device path (eg. /dev/...
1 vote
2 answers
320 views

Is /var/spool automatically removed/cleaned

My app is keeping files in /var/spool/myapp and that works fine. If my app crashes, then it might leave files in that directory. Over time, this can add up to a lot of files, so I wondered if the /...
  • 1,444
0 votes
0 answers
76 views

MX-21 /tmp directory empty on reboot

I am using MX-21 and my /tmp directory is getting purged on every reboot. I would like to keep my /tmp for a week, so after some searching the web I modified the /etc/tmpfiles.d/tmp.conf file and ...
1 vote
0 answers
379 views

what's root cause of "A start job is running for Create Volatile Files and Directories"

Stuck at "A start job is running for Create Volatile Files and Directories" after reboot a server(Debian 9.5, 64bit), and solve by this "boot-stuck-at-a-start-job-is-running-for-create-...
  • 143
0 votes
0 answers
2k views

When to clean up /var/tmp?

/var/tmp is not defined in POSIX, but is defined in FHS: 5.15. /var/tmp : Temporary files preserved between system reboots 5.15.1. Purpose The /var/tmp directory is made available for programs that ...
  • 3,875
2 votes
1 answer
127 views

Why is Supervisord configured to exec/run in the tmp folder by default?

I've got a question regarding supervisord. After running echo_supervisord_conf, I noticed that the directory it runs in is configured as /tmp by default. Why is this the case? Is it because the /tmp ...
  • 23
4 votes
2 answers
326 views

Should TMPDIR have a trailing slash?

In Unix/POSIX/Linux systems it's possible to set the temporary directory via the TMPDIR variable. Wikipedia references a specification by the Open Group mentioning this. What this doesn't answer for ...
  • 91
1 vote
1 answer
9k views

Permission denied in /tmp

/tmp folder has all permission: drwxrwxrwt 28 root root 20480 Jan 24 03:14 /tmp File /tmp/test.txt already exists, with permission 666, owned by user test1. -rw-rw-rw- 1 test1 test1 0 Jan 24 02:34 /...
  • 83
2 votes
1 answer
495 views

How is /tmp linked to /var/tmp

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 ...
  • 106
3 votes
1 answer
742 views

Where can users create temporary files safely?

Once /tmp ideally should be reserved for the system, where can a user create temporary files safely?
1 vote
0 answers
210 views

How to tar-gzip a directory and put it in the /tmp

Hey im stuck on a assignment and i dont know how to solve it really because iam quite new with working in linux. I have to place a directory in a tar-ball and zip it using gzip. At the moment this is ...
0 votes
2 answers
455 views

Can I safely detete the contents of /var/tmp (flatpak items)?

Today I'm trying to save some valuable space on my system disk and I might have a real newbie question: Can I safely detete the contents of /var/tmp (flatpak items)? $ sudo du -sh /var/tmp 1.5G /...
0 votes
1 answer
1k views

How can I increase the size of /tmp directory without affecting RAM or anything else? (Redhat 8.2)

I'm new at Linux and I will get use of your help guys on this.. I want to increase the size of /tmp directory without affecting RAM or anything else on Red Hat 8.2 .. any suggestions to do that? ...
  • 1
0 votes
1 answer
564 views

On xfs, why can't I hardlink to /tmp/, giving the error "Invalid cross-device link" when my fstab indicates tmp is on the same partition?

My error: ln "99700.fa821246f01ef7f3d86a503e33de5753b50640d69de790fd3db5a5dc31ffa45d1dc64a93f950379ee432aa27cbb0593e6e50ddbb6f8a7e279afaf90cec961233.png" /home/anon/foo.png # ^ ...
  • 195
0 votes
0 answers
191 views

Centos, How to delete files with full root (but not full file system), with out repartitioning

Nvidia has screwed me and kept every single old version of CUDA since cuda 10 including every minor version inside of root totaling up to nearly 30 gigabytes of my 50 gigabyte root partition, and upon ...
  • 141
0 votes
1 answer
218 views

Delete /tmp subvolume on btrfs partition scheme and make systemd-tmpfiles work with default tmpfs /tmp directory

I've made the mistake of mounting the /tmp directory as a btrfs subvolume. The problem is that systemd-tmpfiles won't clean it. How can I delete the /tmp subvolume and fix this? I'm new to filesystems,...
0 votes
0 answers
87 views

Browser downloads fail - Insufficient space in /tmp

I have a virtual machine (CentOS) that was pre-configured (I didn't partition them) and I have some of my work on it. When I got access to the VM, it had very less storage space, and it isn't ...
4 votes
1 answer
1k views

curl not able to write to /tmp directory owned by user

I tried running the script as instructed in https://docs.docker.com/engine/security/rootless/: $ curl -fsSL https://get.docker.com/rootless | sh But the script crashed in the following line: curl -L -...
0 votes
1 answer
178 views

mktemp creates file in pwd rather than in /tmp

Previously mktemp used to create files in /tmp. Today I noticed that mktemp is creating file in $PWD rather than in /tmp? Did I change something inadvertently? Any suggestions to fix this? Note: I ...
  • 1,490
1 vote
1 answer
78 views

finding which files were removed from /tmp upon reboot

Hoping against hope here, but is there some in-built logging mechanism through which I can find out which files were deleted from /tmp upon reboot? I could obviously tweak the shutdown scripts, but ...
  • 519
1 vote
1 answer
3k views

How to disable/override automatic mounting of tmpfs to /tmp by systemd?

Background: On my system /tmp is a regular part of the / partition and I use it for a few important features of the system. Current systemd Approach: On new systems systemd has started to take over ...
  • 8,158
0 votes
2 answers
424 views

Is it possible to create a temporary file that will autodelete after a specific time that it's not read by any other program?

I'd like to create a temporary file that will be read by multiple scripts after its creation, but I don't have an easy way of monitoring when the last script finishes reading this temporary file to ...
  • 341
0 votes
0 answers
37 views

Root cannot append to file in /tmp [duplicate]

As root run: cd /tmp seq 10 > foo chmod 666 foo seq 10 >> foo chown daemon foo seq 10 >> foo This gives: -bash: foo: Permission denied It is clear that it is due to /tmp's special ...
  • 31.9k
1 vote
1 answer
620 views

From where does the service ID come from when using PrivateTmp=true in services?

Configuring a systemd service with PrivateTmp=true leads to the fact that the service uses a private tmp directory. Instead of /tmp such a service will use a directory like that: /tmp/systemd-private-...
1 vote
1 answer
150 views

Is it possible to avoid trashing hard disk while using /tmp as a RAM device?

Origin I need to implement some features to my GDB helper scripts but I have to stick with an older version of GDB (5.3, in this case). Since older versions lack so many features, I need to workaround ...
  • 2,111
4 votes
0 answers
291 views

decluttering systemd-private clutter?

Is there any way to configure systemd so that it creates its private tmp directories (for unit files with PrivateTmp=true) in subdirectories under /tmp and /var/tmp instead of the top-level of those ...
  • 72.3k
2 votes
2 answers
2k views

Why is using /tmp/ more popular and recommended than using /dev/shm?

From my own experience, i noticed that most people use /tmp/ for temp files or to save on disk write, but i don't often see anyone recommending or even using /dev/shm instead. Why is that?
5 votes
4 answers
2k views

Is it possible to boot in a way that doesn't delete /tmp?

Say I'm running some lengthy process, consisting of two steps: a generates a big intermediate file, say /tmp/aoutput, then b reads that file and does something further with it. Now the system crashed ...
1 vote
1 answer
110 views

Do Unix/Linux systems generally have a "dump" directory?

A "middle" dump directory (path Y) to which one can to cut/copy-paste a few files from path X and then later cut/copy-paste these into path Z could be handy if someone is say upgrading a ...
  • 11
1 vote
1 answer
3k views

/tmp full but... empty

In a Python program, I use np.memmaps, which make use of the /tmp directory to handle massive arrays. I make sure to clear /tmpregularly by running rm -rf /tmp/* every time I use this code. However ...
0 votes
1 answer
798 views

Create a persistent temp directory with temporary content

I wish to create a directory in $TMP_DIR or /tmp/ which persists forever (i.e. is never deleted) but it is maintained by OS, i.e. the content of which can be deleted if they have not been opened/used ...
  • 703
2 votes
0 answers
276 views

Slow boot process while ubuntu starts because of systemd temporary file creation

I run ubuntu 16.04 on a Dell laptop; I just love the fact that you can set the workspace to a grid format in 16.04, unlike say 18.04 where it looks like a line, but not sure if 20 does have the grid ...
  • 21
0 votes
0 answers
785 views

sudo crontab won't work without /tmp dir: "(CRON) error (create tmpfile)"

My system regularly moves /tmp to /snapshot. (background) Now I want to create a cronjob that checks every minute if the directory was renamed by the system, and renames it back. $ sudo crontab -l # .....
  • 281
1 vote
0 answers
404 views

/tmp messed up, even ls /tmp fails

We are seeing a small cluster become unusable. Initially the same behavior was on a compute node, it is now occuring on the head node. I do not know if this is the underlying source, but for certain ...
1 vote
2 answers
631 views

Should programs remove temporary files in /tmp?

I have a program which uses temporary files, created using the mkstemps function. The files are created inside the /tmp directory. Does these files get removed automatically on program exit? I'm ...
  • 1,315
0 votes
1 answer
78 views

location for multi-user script temp file

On our unix webhost, I created a set of scripts for automating the website deploy process. Since I was the only user, I had the scripts keeping track of what phase of the deploy it was in by changing ...
  • 13.8k
2 votes
1 answer
102 views

Something is creating thousands of .svg files in /tmp and not deleting them

Apparently for months now, some process has been creating an empty .svg file in /tmp every minute and leaving it there. I now have 43,000 of these 262 byte files accumulated. I could just periodically ...
  • 2,575
1 vote
2 answers
449 views

Enabling tmpfs on an already installed system

Right now a system uses LVM on LUKS, with only 2 lvm partitions / and /home. If I now want to make use of tmpfs for /tmp and /var/tmp, can I just add the necessary changes to /etc/fstab and it will ...
1 vote
1 answer
794 views

buildah: use different directory than /tmp for temporary files

My /tmp directory is too small which results in an error when I try to commit an image via buildah: $ buildah commit $container foo:bar ... error storing layer "42" to file: write /tmp/...
  • 365
0 votes
1 answer
1k views

Moving /tmp from ramdisk to other partition

Due to a deficit of RAM on Debian, I need to move /tmp to SSD drive. But I still can't figure it out, how to do that so the programs that use it will still access it under /tmp path. So basically, ...
  • 1
0 votes
1 answer
116 views

How can i create a /tmp partition

i'm trying to intall RHEL Linux Server 7.4 using VMware through a dvd.iso i want to create a partition for the /tmp during the installation, knowing that the graphical interface that permit ...
  • 11
2 votes
1 answer
552 views

How to open a file in the /tmp folder in inkscape?

Some software I use uses inkscape to convert images from one format to another, as an intermediate step. This means that they write images to the /tmp folder, and attempt to use inkscape on those ...
  • 123
1 vote
1 answer
6k views

systemctl enable tmp.mount

Consider the practice of mounting the /tmp directory on a tmpfs memory based filesystem, as can be done with: systemctl enable tmp.mount And consider the following: one justification: The use of ...
  • 5,035