LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-10-2021, 03:13 AM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 493

Rep: Reputation: 134Reputation: 134
Question Where is Slackware's "per user tmp that should survive reboots"?


Hello, everyone.

I need advice on where to put a file that records when I last made a backup.

Now I put it into /run/user/$uid , which is not too bad, but does not survive reboots.

Potential directories include "/var/tmp/user/$pid", "~/.local/var/tmp", ~/.local/tmp", or whatever I haven't thought about.

What is the Slackware way of keeping these files?
 
Old 04-10-2021, 04:07 AM   #2
marav
Member
 
Registered: Sep 2018
Location: France
Distribution: Slackware
Posts: 272

Rep: Reputation: 153Reputation: 153
Hi,

Your /home directory seems to be appropriate
 
Old 04-10-2021, 07:07 AM   #3
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,858

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
For per user I'd consider ~/.local/share/

For system wide I'd consider /var/lib/ or /var/log/
 
Old 04-10-2021, 07:25 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
Traditional Linux systems have user writable /tmp, Slackware does not? Or it is in tmpfs and won't survive reboot?
 
Old 04-10-2021, 07:34 AM   #5
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 400

Rep: Reputation: 208Reputation: 208Reputation: 208
You can try logger(1) from a script or syslog(3) if from a program. Then you can leverage the existing logrotate(8) setup in Slackware.
 
Old 04-10-2021, 01:16 PM   #6
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 183

Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Traditional Linux systems have user writable /tmp, Slackware does not? Or it is in tmpfs and won't survive reboot?
Slackware does have /tmp ! It is not by default in tmpfs or volatil fs. It has no rule to delete after some time as in Centos.

But some folks like me put their /tmp in tmpfs.

For savings, I will store adm datas in the home of the user which does the task in a directory dedicated to that task.
 
Old 04-10-2021, 02:17 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,864

Rep: Reputation: Disabled
I don't think there's a Slackware way for this a Slackware don't fiddle with $HOME. To illustrate this, in Slackware-current:
Code:
didier[/slackware]$ find etc/skel/ 
etc/skel/
etc/skel/.screenrc
didier[/slackware]$
You could just put the file in some folder in ~/.local that you deem appropriate. You just need to remember where you put it.
 
1 members found this post helpful.
Old 04-10-2021, 02:49 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
What Slackware 'man hier' tells about it?
 
1 members found this post helpful.
Old 04-10-2021, 05:53 PM   #9
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,769

Rep: Reputation: 205Reputation: 205Reputation: 205
I agree with Didier Spaier. However, I see per-user directories for kdecache in /var/tmp with content that certainly survived many reboots. Maybe you could do it in a similar way. The other option coming to my mind would be to use syslog and exclude the file from log rotation. Check /etc/logrotate.d for examples.
 
  


Reply

Tags
back-up, slackware, temporary files


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables limit per IP per minute - "No chain/target/match by that name" no_root_no_cry Linux - Networking 3 12-25-2013 03:06 PM
Should a TCP connection be able to survive a short (Few second) interruption? parthelion Linux - Networking 1 09-23-2013 03:15 PM
"No space left on device" error on /tmp. How to increase space on /tmp? anilp Linux - Newbie 12 01-24-2011 01:40 PM
bandwidth measuring per program, per user clausawits Linux - Networking 2 11-17-2003 08:10 PM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration