timestamp is used for questions that are about data specifying seconds since the epoch (19700101T00:00:00) or possible some other standard, and also for (date) and time information in filenames.

learn more… | top users | synonyms

0
votes
1answer
39 views

add 10 days for UNIX timestamps output

I've file contain many of epoch / UNIX timestamps need to add for example +10 days for output date so then I will get new date and I've create bash script with date command but seems doesn't work ...
1
vote
1answer
16 views

What does when the file's status was last changed mean?

I'm reading about find and for one of the tests (-cnewer file) it reads: File's status was last changed more recently than file was modified. What is the file's status? It's obviously a date, ...
1
vote
1answer
46 views

ls -lu does not give last access time

The manpage of ls says: -u with -lt: sort by, and show, access time; with -l: show access time and sort by name; otherwise: sort by access time but that doesn't seem to work: ...
1
vote
2answers
88 views

Full file date (without GNU utilities)

I am trying to obtain the full date (created or modified) of a particular file for passing to another program. I have tried variations of options with the ls command but none provide a full date for ...
2
votes
1answer
38 views

How do I show UTC time in the i3status bar?

In my ~/.i3status.conf I have order += "tztime local" order += "tztime utc" #... tztime local { format = "%Y-%-m-%d %I:%M:%S" } tztime utc { format = "%H:%M:%S" } but my status bar shows ...
1
vote
1answer
30 views

How can I determine last access of a symbolic link without updating it?

Over time, a once tidy directory structure is changed and extended in unanticipated ways on a needs bases. After enough years go by it becomes 'a mess'. Of course, I had nothing to do with it. :-) ...
1
vote
1answer
38 views

Find oldest directory name on a remote server?

I'm writing a backup script of sorts. My backup server contains 3 directories (named by date in the MM-DD-YYYY format) For example: 12-22-2015 12-28-2015 12-29-2015 Im writing my backup script ...
2
votes
1answer
29 views

Change a file's access-, change- and modify-dates to same past date

For a utility I'm developing it would be expedient if I could set all three the named dates associated with the files in some directory to some date in the past. I know I can use touch to set the ...
3
votes
1answer
311 views

I want to list all the files in my Linux server which are older than Dec 31, 2014

I want to list all the Linux files in a directory and sub directories which are older than 31 Dec 2014. Please help me out for this.
1
vote
2answers
55 views

Merging log files with different timestamp formats

I have two types of log files Standard Syslog format The timestamp looks as below 5:2015 Dec 21 07:35:06:ABC:foo1:1559: common.c:946:Enabling filter 6:2015 Dec 21 07:35:08:ABC:bar1:1461: ...
4
votes
1answer
163 views

Copy file creation date to metadata in ffmpeg

I would like to copy the file creation date of an mp4 file into the file's metadata. I'm pretty sure this can be done with ffmpeg and some nifty Linux commands.
-1
votes
1answer
32 views

Listing of files between two timestamp

I want to list down the files between two timestamp. But I can not use newer or newermt command as it doesn't support these tokens. Is there any other way to achieve this? Else I have to write too ...
1
vote
1answer
59 views

I am trying to fetch the logs for last five minutes through a script

I have a output log file which will be continuously appended and I am planning to have a script (runs for every 5 min) to retrieve the last 5 min data from of the output log. Sample data from the ...
1
vote
1answer
27 views

date: Getting next certain hour

I want to get a date-time string in the future, for example I always want to get the next time of 9:00 am. I know the string formats like "tomorrow" or "next day" to get a certain date-time string. ...
0
votes
1answer
38 views

Is ctime on linux always greater or equal as mtime?

I'm trying to clear out how the timestamps of a file on linux work. In this answer is stated: Modify - the last time the file was modified (content has been modified) Change - the last time ...
0
votes
0answers
61 views

Bash prompt time is not always updating

Before I start, this is not a question about how to customize PS1. I have already customized mine and I'm quite happy with it. I usually work in a remote server with SuperPuTTY, which allows me to ...
4
votes
4answers
150 views

Delete all but the most recent n file for each group of files that share the same prefix in a directory

My question is a bit different from some older questions simply asking for "deleting all but the most recent n files in a directory". I have a directory that contains different 'groups' of files ...
5
votes
1answer
59 views

what is a resolution of jiffie in Linux Kernel

What is a resolution of jiffie in Linux Kernel? according to current timer source (cat /sys/devices/system/clocksource/clocksource0/current_clocksource), Linux uses TSC and has nanosecond resolution ...
3
votes
3answers
432 views

Delete all files in a folder except the last (most recent) 20 [duplicate]

I want to remove all the files from different directories, and want to keep only latest files 20 files. is this the correct command to do this? ls -t1 /mnt/dwh/ftp/dwh_ftp_cbs/ARLOGS/ | tail -n +22 | ...
11
votes
5answers
679 views

Test if File was Modified After Date in File Name

I have a files named with YYYYMMDD in the file name, such as file-name-20151002.txt I want to determine if this file was modified after 2015-10-02. Notes: I can do this by looking at the output ...
5
votes
3answers
328 views

Unix epoch in milliseconds

I'm prepending the Unix epoch with "nanosecond" precision into output of my command as below: $ command | while read line; do d=`date +%s%N`; echo $d $line; done > file I looked around to find ...
0
votes
1answer
48 views

how to get crtime of a file in an ext4 partition as a single number or string

I am seeking a method of getting the crtime of a file in hexadecimal or decimal in unix epoch seconds instead of in a date and clock format and with no additional output. This command adds additional ...
1
vote
0answers
27 views

Getting file crtime under ext4 file system [duplicate]

I'm trying to display a file is creation time. I've been searching and I found out that under ext4 file systems this is something indeed possible to get and it's stored as crtime. As you can see in ...
0
votes
2answers
25 views

Create a file with a list of randomized/serialized numbers

I know that I can use the seq command to generate a sequence of numbers, such as: seq 100 999 ...and I know I can create a file with the addition of: seq 100 999 > file.txt ...but what if I ...
4
votes
1answer
63 views

Using File Date/Time as Metadata: Reliable?

Background: I have groups of files in their own directory which I merge into one file in order of their filename. I call them t1.txt, t2.txt, t3.txt... I merge them in order of the integer. ...
4
votes
1answer
53 views

Reason for change in ctime when the file content is modified

I understand that ctime changes when the file metadata or the file content is changed and mtime on file content modification. I would like to know the reason for updating ctime when the content of ...
1
vote
2answers
79 views

Why debugfs doesn't show crtime in nanoseconds?

I am using: debugfs -R 'stat <7473635>' /dev/sda7 to get the file creation time (crtime). Inode: 7473635 Type: regular Mode: 0664 Flags: 0x80000 Generation: 1874934325 Version: ...
5
votes
1answer
191 views

Why are mtime and ctime changing for a directory when a file is modified?

I am learning about atime, ctime, mtime with regard to files and directories. It seems to me that if I modify a file within a directory, I haven't changed the "directory file" itself in its inode or ...
2
votes
1answer
43 views

Is it feasible to update the modified times only without copying files when using rsync?

The modified times of a large amount of local files are incorrect. I want to update the timestamps by syncing the timestamps on the server. It would be time-consuming if the files themselves are ...
2
votes
1answer
68 views

Running compilation scripts only if the source file is more recent than the compiled program

I'm not sure if this question belongs here or some other site but I figured I would start here and some helpful moderator would kick me over if there is a better location. What I am trying to do is ...
1
vote
1answer
121 views

how to disable access time settings in Debian linux

Performance Best Practices for MongoDB implies that: Most file systems will maintain metadata for the last time a file was accessed. While this may be useful for some applications, in a ...
1
vote
1answer
42 views

How do I find directories where none of the files inside have been accessed in a year?

I have a tools directory /tools/tool_name that has hundreds of releases of the tool inside. I am trying to find an easy way of knowing what releases can be archived. Is there an easy way of finding ...
0
votes
0answers
30 views

not modified file increased size

weird thing happened. passwd file size increased although the timestamp hasn't... i've checked for rootkits and nothing found. Any reasons you can think of? Regards
2
votes
2answers
174 views

Sort files with a specific extension by modified time and store them into an array

I have found many answers to sort the files of directory and even to save them in an array. Sorting Example ls -t Directory listing in array array=(*) My particular problem needs to sort files ...
2
votes
3answers
128 views

epoch time for GMT

On AIX date -u gives date and time in GMT format date gives date and time in local timezone date +%s gives local time in epoch time Is there a way to get GMT time in epoch format? In the AIX I'm ...
0
votes
1answer
549 views

How to clear log files periodically?

I am new to shell scripting. I want to clear log files in a directory based on the dates. I have managed to gather this code: DIR1='/home/u01/app/oracle/servers/DIR1/logs' ...
0
votes
1answer
454 views

Unix date format validation script

I wrote this small unix shell script to validate the date format. My script should check whether the string is in YYYYMMDDHHMISS format . If it is not in this format , it should send an error message ...
0
votes
1answer
184 views

Wrong timestamp in systemd log

I read systemd log of my home server using journalctl and I've noticed that the timestamp of log is totally out of order. Here's some logs from my server using journalctl -o=short-iso ...
3
votes
2answers
246 views

Script for changing modification time of files and directories recursively

I have many big folders with thousands of files in them and I want to use touchto set their modification times to be "original time"+3 hours. I got this script from a similar thread in superuser: ...
12
votes
3answers
1k views

How do I get the current time in a different time zone without changing system time? [duplicate]

I am trying to use 'date' to get the time in a different time zone, and failing. All the methods I've found on google involve changing the time zone on the system, but that is not what I want. Is ...
1
vote
1answer
319 views

get original creation date of html file

Can I find the creation/last modified date of an html file? For example, I would like to know when some index.html file from some website was created, not when I downloaded it.
1
vote
2answers
110 views

du: combine both timestamps

On Linux, du offers the displaying of timestamps: atime OR ctime OR mtime Question: Is there an easy way to get all three of them displayed at the same time (one file, all three timestamps)? I guess ...
0
votes
1answer
616 views

Remove files newer than X day and hour

I want to remove files, more specifically, symbolic links of /usr/include that are newer than 2 JUN 22:27 How can I do this?
1
vote
0answers
49 views

System accounting misbehaviour on MacOS X (Yosemite)?

On all my Unixes (CentOS, FreeBSD, MacOS X) I activate the system accounting as a basic security rule. On MacOS X (Yosemite, 10.10.3) I see a misbehaviour I am investigating to fix. Everytime I run ...
2
votes
1answer
115 views

Get all filenames in a directory created before input date

I have a directory containing lots of files. The output of ls command is -rw-r--r-- 1 nobody nogroup 427494 May 26 13:59 14_20150526065238928590_102.txt -rw-r--r-- 1 nobody nogroup 2113592 May ...
4
votes
4answers
2k views

Move files by date into different directory using CLI

I have a large number of pictures from an old hard drive that I'm trying to organize. If I run ls -l, I notice all of these files have a creation date of 2012 or before. Ideally, I'd like to move ...
0
votes
1answer
104 views

set my system date & time via terminal

I don't why a + sign appears in the my program: <ns1:ST>2015-05-23T18:00:00+04:00</ns1:ST> <ns1:ET>2015-05-23T18:15:00+04:00</ns1:ET> this is when I run the program in my ...
5
votes
5answers
3k views

How to get system time with microsecond Resolution

I want to know current system time with microsecond Resolution. date +%s returns Time in seconds since epoch(1-1-1970). How can I get time in microseconds Resolution. How much delay is in querying ...
0
votes
1answer
188 views

PAM timestamp - how to inspecting the /var/run/sudo/<user> file?

The centos documentation stated that: ... In the PAM timestamp scheme, the graphical administrative application prompts the user for the root password when it is launched. When the user has ...
3
votes
1answer
2k views

Copy a file and append a timestamp

I've got two issues with my script that copies files and adds a timestamp to the name. cp -ra /home/bpacheco/Test1 /home/bpacheco/Test2-$(date +"%m-%d-%y-%T") The above adds Test2 as the filename, ...