Create a file which date is several days ago

Create a file "1 week ago"

============================

#[email protected]:/root/study# date +%Y%m%d
20140718
[email protected]:/root/study# touch -d "1 week ago" file2
[email protected]:/root/study# touch -d "10 day ago" file1
[email protected]:/root/study# ls -l file1 file2
-rw-r--r-- 1 root root 0 Jul  8 23:10 file1
-rw-r--r-- 1 root root 0 Jul 11 23:10 file2

时间: 2024-08-03 16:29:35

Create a file which date is several days ago的相关文章

SP2-0110: Cannot create save file "afiedt.buf"

sp2-0110:无法创建保存文件"afiedt.buf" 出处:此问题是由于使用 define _editor=vim 时,用ed更改时报错 问题原因:Cannot create save file "afiedt.buf" 因为在执行 edit的时候 "afiedt.buf" 文件默认保存在你键入sqlplus命令时所在目录中 比如:你在 / 目录下进入sqlplus, 当你用edit时,"afiedt.buf"文件就会保

Linux出现cannot create temp file for here-document: No space left on device的问题解决

在终端输入:cd /ho 按tab键时,显示错误: bash: cannot create temp file for here-document: No space left on device 这是由于该磁盘的空间已经满了,这时候可以进行扩容,或者将该磁盘的部分目录迁移到别的磁盘. 以下为解决思路,查找最大的文件,然后将其干掉: 1.使用命令df -h 查看硬盘空间 2.命令top查看cpu及内存 3.使用命令du -h –max-depth=1 /var/log/* 查看/var/log路

170318 11:44:26 [ERROR] Can't start server: can't create PID file: No space left on device

数据库挂了.打开远程,进了系统,service mysqld stop 失败.service mysqld start等了好大一会,提示Timeout error occurred trying to start MySQL Daemon 出现Can't start server: can't create PID file: No space left on device这个错误. 提示磁盘空间不足 后用df -h 命令查看 竟然发现磁盘容量全部用完了,于是要查看是谁占用了用命令:find /

MySQL [Warning] Can’t create test file xxx lower-test(转)

add by zhj:修改的数据库的datadir,然后数据库就无法启动了,错误如下 2014-12-11 16:22:57 26309 [Warning] Can't create test file /data/mysql/server2.lower-test 2014-12-11 16:22:57 26309 [Warning] Can't create test file /data/mysql/server2.lower-test 2014-12-11 16:22:57 26309 [

How to create .gitignore file in Windows Explorer

How to create .gitignore file I need to add some rules to my .gitignore file, however, I can't find it in my project folder. Isn't it created automatically by Xcode? If not, what command allows me to create one? echo 'xxx' > .gitignore To get around

异常/usr/bin/install: cannot create regular file `/usr/local/jpeg6/include/jconfig.h'

出现下列异常: /usr/bin/install -c -m 644 jconfig.h /usr/local/jpeg6/include/jconfig.h /usr/bin/install: cannot create regular file `/usr/local/jpeg6/include/jconfig.h': No such file or directory make: *** [install-headers] Error 1 原来要创建对应的目录,命令如下: mkdir -p

Create Excel file in java using PoI

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 8

Error: unpack could not create JAR file:

[[email protected] ~]# rpm -ivh jdk-7u55-linux-i586.rpm Preparing...                ########################################### [100%]   1:jdk                    ########################################### [100%]Unpacking JAR files...        rt.jar..

failed to create pid file /var/run/rsyncd.pid: File exists报错

[[email protected] ansible_playbooks]# ps aux|grep rsyncroot      1799  0.0  0.0 114652   480 ?        Ss   Jun29   0:00 rsync --daemonroot     61754  0.0  0.0 112664   972 pts/2    S+   11:17   0:00 grep --color=auto rsync[[email protected] ansible_