centos7中/tmp文件保存天数
不要在/tmp目录下保存文件,该目录会定期清理文件
/tmp默认保存10天
/var/tmp默认保存30天
配置文件:/usr/lib/tmpfiles.d/tmp.conf
默认配置文件:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override
# 默认保留时间变为了10天,如果这10天内没做任何调整,会被处理
v /tmp 1777 root root 10d
v /var/tmp 1777 root root 30d
# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-%b-*
X /tmp/systemd-private-%b-*/tmp
x /var/tmp/systemd-private-%b-*
X /var/tmp/systemd-private-%b-*/tmp
centos7中/tmp文件保存天数的更多相关文章
- Centos7 中查找文件、目录、内容
1.查找文件 find / -name ‘filename’ 2.查找目录 find / -name ‘path’ -type d 3.查找内容 find . | xargs grep -ri ‘co ...
- 关于Linux系统清理/tmp/文件夹的原理
转自:http://www.opsers.org/base/clean-up-on-the-linux-system-tmp-folder-you-may-want-to-know.html 我们知道 ...
- 在DELPHI中*.wav 文件怎么加到资源文件中
比较“流行”的说法是:“16位的Delphi 1.0和32位的Delphi2.0.3.0都提供了资源 编译工具,其中 Delphi 1.0的资源编译器叫BRCC.EXE,D ...
- x系统清理/tmp/文件夹的原理
转自:http://www.opsers.org/base/clean-up-on-the-linux-system-tmp-folder-you-may-want-to-know.html§ 我们知 ...
- C# Wpf 文件保存对话框
C# Wpf库中无文件保存对话框,需引用winform,引用winform后多处提示引用不明确,将winform引用改别名. // 引用winform,改别名 using Forms = System ...
- centos7中配置java + mysql +jdk +使用jar部署项目
centos7中配置java + mysql +jdk +使用jar部署项目 思维导图 1. 配置JDK環境 1.1下载jdk安装包 Java Downloads | Oracle 1.2 将下载j ...
- 如何在Linux中自动删除或清理/tmp文件夹内容?
每个Linux系统都有一个名为的目录/tmp,该目录已挂载了单独的文件系统. 它具有称为tmpfs的特殊文件系统.这是一个虚拟文件系统,操作系统将在系统引导时自动挂载/tmp挂载点. 如果要根据应用程 ...
- 获取保存在沙盒中plist文件的用户的字典信息
获取保存在沙盒中plist文件的用户的字典信息
- MyEclipse右键new菜单项的设置 及 Eclipse中各种文件不能保存中文的问题
有时候,myeclipse右键new的时候经常出现一些ejb等文件你懂的,很是恶心~~ Window --> Customize Perspective --> Submenus --&g ...
随机推荐
- 机器学习基石笔记:Homework #1 PLA&PA相关习题
原文地址:http://www.jianshu.com/p/5b4a64874650 问题描述 程序实现 # coding: utf-8 import numpy as np import matpl ...
- 性能调优之Transformation
优化之Aggregator组件 优化之Custom组件 优化之Joiner组件 优化之Lookup组件 优化之Normalizer组件 优化之Sequence Generator组件 优化之Sorte ...
- scala时间和时间戳互转
时间转换为时间戳: import java.text.SimpleDateFormat object test { def main(args: Array[String]): Unit = { va ...
- Nginx篇--Nginx源码搭建
Nginx安装步骤: 1.依赖 gcc openssl-devel pcre-devel zlib-devel 安装:yum install gcc openssl-devel pcre-dev ...
- 『数组的最大代价 贪心优化DP』
数组的最大代价(51nod 1270) Description 数组A包含N个元素A1, A2......AN.数组B包含N个元素B1, B2......BN.并且数组A中的每一个元素Ai,都满足1 ...
- andrroid 测试那点事
1.拨号*#*#98284#*#* 2.查看imei号:拔号 *#06# 3.抓取 MTK Log *#*#3646633#*#* 高通平台 *#62564# 4.查看手机的cpu架构信息:adb s ...
- 重排序、hb、ConcurrentHashMap弱一致性(jdk1.6)
double pi = 3.14; //A double r = 1.0; //B double area = pi * r * r; //C 1.A -> B //不满足happens- ...
- Kafka Producer源码简述
接着上文kafka的简述,这一章我们一探kafka生产者是如何发送消息到消息服务器的. 代码的入口还是从 kafkaTemplate.send开始 最终我们就会到 org.springframewor ...
- Chapter 5 Blood Type——17
"I'll be coming around with a dropper of water to prepare your cards, so please don't start unt ...
- Spring Boot 2.x(六):优雅的统一返回值
目录 为什么要统一返回值 ReturnVO ReturnCode 使用ReturnVO 使用AOP进行全局异常的处理 云撸猫 公众号 为什么要统一返回值 在我们做后端应用的时候,前后端分离的情况下,我 ...