LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
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
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,358

Rep: Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068
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: 2,971

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
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 ~amd64
Posts: 7,661

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: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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: 399

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
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-15.0
Posts: 11,057

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 ~amd64
Posts: 7,661

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,839

Rep: Reputation: 242Reputation: 242Reputation: 242
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



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 10:29 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