Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

5 votes
2 answers
4397 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 -o docker.tgz "$STATIC_RELEASE_URL" With the message: Warning: Failed to create the file docker.tgz:...
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 -o docker.tgz "$STATIC_RELEASE_URL" With the message: Warning: Failed to create the file docker.tgz: Permission denied curl: (23) Failure writing output to destination I narrowed down the problem to curl trying to write to the tmp folder created by mktemp -d, but I don't understand why it fails. Some context: $ whoami thiago $ uname -a Linux thiago-acer 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux $ mktemp -d /tmp/tmp.U1nPTN5dlS $ cd /tmp/tmp.U1nPTN5dlS $ ls -la total 8 drwx------ 2 thiago thiago 4096 Jun 17 18:20 . drwxrwxrwt 25 root root 4096 Jun 17 18:20 .. After running the commands above, I tried: # this fails with the same message as above curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.7.tgz -O # this works just fine curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.7.tgz -o - > docker-20.10.7.tgz # this also works wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.7.tgz The curl -O command also works if I try it on some other folder, like my home folder. Any help is appreciated.
Thiago Barcala (151 rep)
Jun 17, 2021, 04:26 PM • Last activity: Aug 2, 2025, 03:05 PM
15 votes
1 answers
3710 views
Is it possible to change systemd private tmp directory?
I am running some programs on both Debian and Fedora. When I `ls` the `/tmp` directory, I see many directories with extremely long name like systemd-private-d85027...-bluetooth.service-qxzMGm systemd-private-d85027...-chronyd.service-vSzXdP systemd-private-d85027...-colord.service-LvpIL2 systemd-pri...
I am running some programs on both Debian and Fedora. When I ls the /tmp directory, I see many directories with extremely long name like systemd-private-d85027...-bluetooth.service-qxzMGm systemd-private-d85027...-chronyd.service-vSzXdP systemd-private-d85027...-colord.service-LvpIL2 systemd-private-d85027...-fwupd.service-cbpodH systemd-private-d85027...-httpd.service-rJIaIX It seems to be related to PrivateTmp, but how can I remove them or move them to a less distracting location? (e.g. from /tmp/systemd-... to /tmp/.systemd-...) I want to try not to change the PrivateTmp option for every service.
Eric Stdlib (559 rep)
Apr 3, 2018, 08:56 PM • Last activity: Jul 29, 2025, 10:00 AM
0 votes
2 answers
4267 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? Thanks!
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? Thanks!
Kai Mo (1 rep)
Sep 7, 2021, 06:42 PM • Last activity: Jul 20, 2025, 07:08 AM
1 votes
1 answers
2252 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 in a while or system needs more space. **Essentially directory to put random temporary stuff in...
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 in a while or system needs more space. **Essentially directory to put random temporary stuff in and forget about maintaning it, but not having to recreate this directory anytime I want to use it and it's path doesn't change so scripts/application can use it.** What is the best way to achieve this? I can see in /etc/default/periodic.conf there're these options:
# 110.clean-tmps
daily_clean_tmps_enable="YES"               # Delete stuff daily
daily_clean_tmps_dirs="/tmp"                # Delete under here
daily_clean_tmps_days="3"               # If not accessed for
daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix"
daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group"   # Don't delete these
daily_clean_tmps_verbose="YES"              # Mention files deleted
Can I add a path to daily_clean_tmps_ignore e.g. ...="my-persistant-unique-dir and it will respect it?
user14492 (933 rep)
Jul 22, 2020, 10:48 AM • Last activity: Jul 5, 2025, 04:08 AM
1 votes
2 answers
102 views
No space left on device while building Python-3.13.3
Am installing `Python-3.13.3` on an `Ubuntu 22.04 LTS` system. `make` reported ../../../src/Python/python-3.13.3/Parser/parser.c:42298:1: fatal error: error writing to /tmp/ccC4u7pE.s: No space left on device 42298 | } | ^ compilation terminated. Took a look at the `/tmp` directory, and wonder if I...
Am installing Python-3.13.3 on an Ubuntu 22.04 LTS system. make reported ../../../src/Python/python-3.13.3/Parser/parser.c:42298:1: fatal error: error writing to /tmp/ccC4u7pE.s: No space left on device 42298 | } | ^ compilation terminated. Took a look at the /tmp directory, and wonder if I can delete the files in there. Can they be deleted without messing up anything? Displays the disk usage and available space for all mounted filesystems df -h Filesystem Size Used Avail Use% Mounted on tmpfs 785M 1,8M 783M 1% /run /dev/sda3 23G 22G 0 100% / tmpfs 3,9G 0 3,9G 0% /dev/shm tmpfs 5,0M 4,0K 5,0M 1% /run/lock /dev/sda2 512M 296K 512M 1% /boot/efi /dev/sda5 890G 468G 378G 56% /home tmpfs 785M 128K 785M 1% /run/user/1000 *** df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/sda3 23G 22G 11M 100% / *** df -h -t ext4 Filesystem Size Used Avail Use% Mounted on /dev/sda3 23G 22G 0 100% / /dev/sda5 890G 468G 378G 56% /home *** lsblk -o size,fstype,model,name SIZE FSTYPE MODEL NAME 931,5G WDC WD10JPVX-22JC3T0 sda 1M ├─sda1 513M vfat ├─sda2 23,3G ext4 ├─sda3 2,9G swap ├─sda4 904,9G ext4 └─sda5 465,8G WDC WD5000LPVX-00V0TT0 sdb 465,8G LVM2_member └─sdb1 18,6G ext4 ├─trisquel--vg-root 2,9G swap ├─trisquel--vg-swap_1 444,3G xfs └─trisquel--vg-home 1024M MATSHITABD-CMB UJ141EF sr0 1024M BD-RW BDR-XS07 sr1 The partitions have been set automatically during the installation of Trisquel 11 (based upon Ubuntu 22.04 LTS). My idea is to use lvresize sudo lvresize -r -L -11G vgtrisquel/home sudo lvresize -r -l +100%FREE vgtrisquel/root
Heime (45 rep)
May 19, 2025, 08:52 PM • Last activity: May 23, 2025, 04:28 PM
2 votes
1 answers
4180 views
How to increase size of root?
Here is information regarding my disk space consumption. Command (m for help): p Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel typ...
Here is information regarding my disk space consumption. Command (m for help): p Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x360c373e Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 17577983 17575936 8.4G 83 Linux /dev/sda2 17580030 976771071 959191042 457.4G 5 Extended /dev/sda5 17580032 23437311 5857280 2.8G 83 Linux /dev/sda6 23439360 47773695 24334336 11.6G 82 Linux swap / Solaris /dev/sda7 47775744 48553983 778240 380M 83 Linux /dev/sda8 48556032 976771071 928215040 442.6G 83 Linux But Gparted is not able to change (shrink) the size of home! My tmp was full and my root is low on space. I used sudo apt-get clean In fact, I transferred the docs from root to home as a workaround. What are the alternatives? I want to end this by increasing root size but can't able to do it. This is what Gparted shows me: enter image description here
Love Grover (401 rep)
Jan 12, 2017, 06:36 PM • Last activity: May 6, 2025, 09:10 PM
4 votes
3 answers
23115 views
specify mount option in /etc/fstab (mode=1777)
I have following line in my `/etc/fstab`: /dev/mapper/tmp /tmp ext4 noexec,nodev,nosuid,mode=1777 0 0 When I try to mount `/tmp`, I get following error in `dmesg`: EXT4-fs (dm-1): Unrecognized mount option "mode=1777" or missing value How can I specify that `/tmp` will have permissions `1777` ? I am...
I have following line in my /etc/fstab: /dev/mapper/tmp /tmp ext4 noexec,nodev,nosuid,mode=1777 0 0 When I try to mount /tmp, I get following error in dmesg: EXT4-fs (dm-1): Unrecognized mount option "mode=1777" or missing value How can I specify that /tmp will have permissions 1777 ? I am recreating (formatting) the filesystem on /dev/mapper/tmp every time I boot, so the permissions do not survive reboot. From what I googled, mode=1777 should do the job. But it does not work for me. UPDATE: ======== To make the situation more illustrative, here is the script that I am using: cryptsetup --key-file /dev/urandom create tmp /dev/sda2 mkfs.ext4 /dev/mapper/tmp > /dev/null 2>&1 This script is run during the boot sequence, after checkroot. Then, later when bootall wants to mount /tmp, it sees the entry in fstab and mounts /dev/mapper/tmp as /tmp. Since I am creating the LUKS device during every boot, I have to format the partition every time as well. Contrary to what some people have commented here, the permissions **DO NOT** survive the formatting. Obviously.
Martin Vegter (586 rep)
Dec 5, 2014, 08:49 PM • Last activity: Apr 18, 2025, 09:08 PM
92 votes
11 answers
347141 views
Tab completion errors: bash: cannot create temp file for here-document: No space left on device
When using the tab bar, I keep getting this error: > bash: cannot create temp file for here-document: No space left on device" Any ideas? I have been doing some research, and many people talk about the /tmp file, which might be having some overflow. When I execute `df -h` I get: Filesystem Size Used...
When using the tab bar, I keep getting this error: > bash: cannot create temp file for here-document: No space left on device" Any ideas? I have been doing some research, and many people talk about the /tmp file, which might be having some overflow. When I execute df -h I get: Filesystem Size Used Avail Use% Mounted on /dev/sda2 9.1G 8.7G 0 100% / udev 10M 0 10M 0% /dev tmpfs 618M 8.8M 609M 2% /run tmpfs 1.6G 0 1.6G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 1.6G 0 1.6G 0% /sys/fs/cgroup /dev/sda1 511M 132K 511M 1% /boot/efi /dev/sda4 1.8T 623G 1.1T 37% /home tmpfs 309M 4.0K 309M 1% /run/user/116 tmpfs 309M 0 309M 0% /run/user/1000 It looks like the /dev/data directory is about to explode, however if I tip: $ du -sh /dev/sda2 0 /dev/sda2 It seems it's empty. I am new in Debian and I really don't know how to proceed. I used to typically access this computer via ssh. Besides this problem I have several others with this computer, they might be related, for instance each time I want to enter my user using the GUI (with root it works) I get: > Xsession: warning: unable to write to /tmp: Xsession may exit with an error
lucasrodesg (1023 rep)
Apr 18, 2016, 10:07 PM • Last activity: Apr 15, 2025, 08:30 AM
0 votes
2 answers
62 views
How can I store some 6 Gb of files in a temp directory that will be automatically deleted within one day and not require a reboot
I would like to store some files in a temp directory that will be automatically deleted within one day and not require a reboot. The files will be about 6 Gigabytes. When should I use /tmp? Use /tmp for smaller, size-bounded files only I searched but could not find out what a size-bounded file is. I...
I would like to store some files in a temp directory that will be automatically deleted within one day and not require a reboot. The files will be about 6 Gigabytes. When should I use /tmp? Use /tmp for smaller, size-bounded files only I searched but could not find out what a size-bounded file is. Is this my $HOME/tmp directory ? /tmp$ ls config-err-ZMgCKu dock-replace.log MozillaUpdateLock-413E48437DD69C69 SiriKali-1000 snap-private-tmp I am also studying this. https://www.baeldung.com/linux/systemd-tmpfiles-configure-temporary-files
Andrew K (103 rep)
Feb 18, 2025, 02:33 AM • Last activity: Feb 18, 2025, 09:15 AM
3 votes
0 answers
99 views
Slow Linux file access to /tmp
time touch /tmp/test.dat real 0m1.03s user 0m0.00s sys 0m1.02s A full second of sys-mode time to create a file in `/tmp`. That can become unbearable for ksh scripts that open dozens of files in `/tmp` for subshell handling. strace shows the time at the `openat` call: strace -tttT touch /tmp/test.dat...
time touch /tmp/test.dat real 0m1.03s user 0m0.00s sys 0m1.02s A full second of sys-mode time to create a file in /tmp. That can become unbearable for ksh scripts that open dozens of files in /tmp for subshell handling. strace shows the time at the openat call: strace -tttT touch /tmp/test.dat . . . [clip] . . . 1737560680.004656 close(3) = 0 1737560680.004750 openat(AT_FDCWD, "/tmp/test.dat", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3 1737560681.375253 dup2(3, 0) = 0 . . . [clip] . . . Current CPU during these tests has 70-80% idle. Plenty of memory. /tmp is only 1% used, though it does have a lot of empty directories beneath it (5,268). Server has been up 96 days. We had this problem on another server which panicked for some reason and rebooted. After the reboot, the problem was gone - access to /tmp was fast again. So something over time is causing /tmp access to get slower and slower, and a reboot clears it. OS version: 5.4.17-2136.322.6.4.el8uek.x86_64, built by Oracle (this is an Exadata compute node) /tmp mount: /dev/mapper/VGExaDb-LVDbTmp xfs 45G 45M 45G 1% /tmp Oracle support threw up their hands (didn't really try, to be honest). Any Unix gurus out there have ideas on what I can look into? What kinds of things can cause this to be so slow?
Paul W (183 rep)
Jan 22, 2025, 03:54 PM • Last activity: Jan 22, 2025, 08:25 PM
346 votes
8 answers
353375 views
How create a temporary file in shell script?
While running a script, I want to create a temporary file in `/tmp` directory. After execution of that script, that will be cleaned by that script. How to do that in shell script?
While running a script, I want to create a temporary file in /tmp directory. After execution of that script, that will be cleaned by that script. How to do that in shell script?
Bhuvanesh (3595 rep)
Jan 30, 2015, 07:02 AM • Last activity: Jan 19, 2025, 03:02 PM
7 votes
4 answers
1459 views
Ways to keep files in /tmp?
I have a RHEL 8 workstation that hosts an app whose GUI is accessible through https on an unprivileged port. When the app is started, it creates a few socket files in `/tmp` with random names and the `.sock` suffix: ```sh $ ls -l /tmp/*.sock srwx------ 1 app app 0 Dec 21 13:30 /tmp/supervisor-358513...
I have a RHEL 8 workstation that hosts an app whose GUI is accessible through https on an unprivileged port. When the app is started, it creates a few socket files in /tmp with random names and the .sock suffix:
$ ls -l /tmp/*.sock
srwx------ 1 app app 0 Dec 21 13:30 /tmp/supervisor-358513b0f6222d2339e4ab66d30b0037.sock
srwx------ 1 app app 0 Dec 21 13:31 /tmp/mongodb-358513b0f6222d2339e4ab66d30b0037.sock
srwx------ 1 app app 0 Dec 21 13:31 /tmp/livegui-358513b0f6222d2339e4ab66d30b0037.sock

$ file /tmp/*.sock
/tmp/supervisor-358513b0f6222d2339e4ab66d30b0037.sock: socket
/tmp/mongodb-358513b0f6222d2339e4ab66d30b0037.sock:    socket
/tmp/livegui-358513b0f6222d2339e4ab66d30b0037.sock:    socket
**update:** The "random" part of the socket filenames is in fact a MD5 of the path where the app is installed. When people use the app frequently, the app works fine for weeks/months, but when nobody connects to the app for a few days, it stops responding; when that happens I can see that the .sock files got deleted while the app processes are still running... Is there any way to prevent the deletion of the app socket files in /tmp?
Fravadona (1581 rep)
Dec 21, 2024, 04:48 PM • Last activity: Jan 16, 2025, 01:43 PM
1 votes
0 answers
112 views
Documentation for /tmp's default permissions
**Is there any documentation for the default permissions of the /tmp folder on \*nix, in particular Linux?\ (Or perhaps /tmp doesn't have specified default permissions?)** Background:\ I'm trying to ensure temporary files I store inside of /tmp are secured. In particular I'd like a guarantee that th...
**Is there any documentation for the default permissions of the /tmp folder on \*nix, in particular Linux?\ (Or perhaps /tmp doesn't have specified default permissions?)** Background:\ I'm trying to ensure temporary files I store inside of /tmp are secured. In particular I'd like a guarantee that the sticky bit (aka restricted deletion flag) is set on /tmp, so that the files cannot be deleted or renamed by anyone except the file owner. Searching around the web, it seems the sticky bit is likely set, e.g. - https://www.thegeeksearch.com/what-is-the-correct-permission-for-tmp-directory-in-linux/ - https://en.wikipedia.org/wiki/Sticky_bit However, I'd like to have "official" documentation confirming it one way or the other for the desktops my program may run on (which are Linux (most likely distros are Ubuntu and Debian) and macOS). This is so that I can be sure it's treated like a contract, and able to rely on it being set. The wording I find is typically more suggestive, along the lines of "typically the sticky bit is applied to /tmp". The most official documentations I've found are the below two: - [Linux man page for chmod](https://man7.org/linux/man-pages/man1/chmod.1.html#RESTRICTED_DELETION_FLAG_OR_STICKY_BIT) : "the restricted deletion flag [...] is commonly found on world-writable directories like /tmp" Which is suggestive of it being set, whereas I'd like a statement confirming it. - [An answer in Red Hat's Customer portal](https://access.redhat.com/solutions/49267) : "The /tmp directory requires special permissions. This directory has Sticky Bit permissions." This is the only mention I've found where it confirms /tmp has the sticky bit set (albeit on Red Hat). But it is not their [official documentation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/) , so it doesn't give me fully the same confidence as a specification in their documentation would (which I would treat as a contract they will uphold).
burija (11 rep)
Jan 15, 2025, 05:06 PM
14 votes
4 answers
8284 views
Prevent a directory in /tmp from being deleted
I often use the `/tmp` directory on my Linux machine for storing temporary files (e.g. PDFs from a site that wants me to download it first etc.) and I often create a directory with my username. But at every startup it (including all files) gets deleted. Now I know I can put it in `/var/tmp`, but I w...
I often use the /tmp directory on my Linux machine for storing temporary files (e.g. PDFs from a site that wants me to download it first etc.) and I often create a directory with my username. But at every startup it (including all files) gets deleted. Now I know I can put it in /var/tmp, but I want all its contents to be deleted, but for the directory itself to be kept. So:
tmp
 |- me # this should stay
 |  |- foo1 # this should be deleted...
 |  |- bar1 # ...and this as well
 |- other stuff...
Is there any way to do this? Maybe with permissions or with a special configuration?
ummw (434 rep)
Apr 7, 2019, 12:16 PM • Last activity: Dec 21, 2024, 06:01 PM
0 votes
1 answers
49 views
tmpreaper error: run time exceeded
How to overcome/force-fix the following problem: $ sudo /usr/sbin/tmpreaper 15d /tmp error: run time exceeded! This may be indicative of an attack to use tmpreaper to remove critical files; or the directories to clean up are excessive large and/or messed up. Please investigate. One of my servers con...
How to overcome/force-fix the following problem: $ sudo /usr/sbin/tmpreaper 15d /tmp error: run time exceeded! This may be indicative of an attack to use tmpreaper to remove critical files; or the directories to clean up are excessive large and/or messed up. Please investigate. One of my servers constantly runs out of disk space, then I installed tmpreaper, thinking the problem would be over, yet it is not. Today I just realized where the problem is.
xpt (1858 rep)
Dec 6, 2024, 06:13 AM • Last activity: Dec 7, 2024, 08:34 AM
5 votes
2 answers
12097 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][1] sometimes, and in what case I need to create or modify it. Recently, I often see suggested to use systemd `tmp.mount` confuguration. For example, [on Debian][2]...
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 often see suggested to use systemd tmp.mount confuguration. For example, on Debian :
$ sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/
$ sudo systemctl enable tmp.mount
Which of the two methods is more appropriate for everyday use? In what situations one is better than the other? When do I need to deal with /etc/default/tmpfs?
Alexey (2310 rep)
Oct 26, 2022, 09:20 AM • Last activity: Oct 3, 2024, 12:09 PM
11 votes
5 answers
19662 views
Why is `systemd-tmpfiles --clean` not working?
I have the following configuration to clean up temporary files (default for CentOS 7), which says that files in `/tmp` should be removed if they are more than 10 days old. [root]# tail -n +10 /usr/lib/tmpfiles.d/tmp.conf | head -n 3 # Clear tmp directories separately, to make them easier to override...
I have the following configuration to clean up temporary files (default for CentOS 7), which says that files in /tmp should be removed if they are more than 10 days old. [root]# tail -n +10 /usr/lib/tmpfiles.d/tmp.conf | head -n 3 # Clear tmp directories separately, to make them easier to override d /tmp 1777 root root 10d d /var/tmp 1777 root root 30d However, even after running systemd-tmpfiles --clean, when I look at the contents of /tmp, there are files in there that are more than 10 days old. [root]# ls -dl /tmp/backup-inspection drwxr-xr-x 8 root root 68 Aug 29 2014 /tmp/backup-inspection The contents of the /tmp directory is huge: [root]# du -h /tmp | tail -n 1 3.5G /tmp Can anyone explain to me why the backup-inspection directory is not removed? It is nearly 1 year old?
magnus (449 rep)
Aug 3, 2015, 01:10 AM • Last activity: Aug 24, 2024, 05:05 AM
119 votes
3 answers
253362 views
What are correct permissions for /tmp ? I unintentionally set it all public recursively
I have created a really really short life temporary directory that I wanted to share between some users for a few hours : `/some/path/tmp` Unfortunately I have launched `sudo chmod 777 -R /tmp` instead of `sudo chmod 777 -R tmp`, so my `/tmp` file is now completely public. Is it a security concern n...
I have created a really really short life temporary directory that I wanted to share between some users for a few hours : /some/path/tmp Unfortunately I have launched sudo chmod 777 -R /tmp instead of sudo chmod 777 -R tmp, so my /tmp file is now completely public. Is it a security concern now that it is completely set to public? Should I change it back to more secure settings? What are the correct permissions for /tmp?
Stephane Rolland (4355 rep)
Apr 8, 2013, 12:38 AM • Last activity: Jun 13, 2024, 06:55 AM
9 votes
2 answers
3583 views
Can LVM snapshots be writable? (and used for temporary experiments)
It seems that usually it is talked about snapshots as read-only. (In a scenario where [one creates a snapshot, then does some experiments with the main volume, and then restores the old state](https://unix.stackexchange.com/q/18913/4319) by ["merging" the snapshot into the main volume](https://unix....
It seems that usually it is talked about snapshots as read-only. (In a scenario where [one creates a snapshot, then does some experiments with the main volume, and then restores the old state](https://unix.stackexchange.com/q/18913/4319) by ["merging" the snapshot into the main volume](https://unix.stackexchange.com/questions/18913/how-to-create-a-read-only-snapshot-in-lvm-and-then-rollback-to-it-after-some-wor/18914#18914).) Is an alternative scenario possible in LVM? I.e., where one doesn't even want the temporary experiments to be visible in the main volume, so one creates a "temporary" snapshot, makes it writable, does the experiments there, in that "branch", and then discards the snapshot (or perhaps merges it if one is satisfied with the results)? And if writable snapshots are possible in LVM, then what happens when merging a modified snapshot into the main volume which also has had some different modifications? (BTW, [btrfs snapshots seem to be writable by default](https://unix.stackexchange.com/q/18912/4319) , so this scenario seems to be well possible in btrfs.)
imz -- Ivan Zakharyaschev (15862 rep)
Aug 22, 2011, 11:27 PM • Last activity: May 17, 2024, 01:19 PM
3 votes
5 answers
4278 views
How to access temporary file straight after creation?
I've script which is connecting to remote host via SSH, creates temporary file and executing the following command: > Calling system(mysql --database=information_schema --host=localhost tail: cannot open `/tmp/drush_*' for reading: No such file or directory Is there any trick accessing such file str...
I've script which is connecting to remote host via SSH, creates temporary file and executing the following command: > Calling system(mysql --database=information_schema --host=localhost tail: cannot open `/tmp/drush_*' for reading: No such file or directory Is there any trick accessing such file straight after it's being created to show it's content?
kenorb (22004 rep)
Oct 28, 2014, 10:53 PM • Last activity: May 13, 2024, 02:19 PM
Showing page 1 of 20 total questions