The timestamps tag has no wiki summary.
7
votes
4answers
558 views
Preserve modified time stamp after edit
For files within a specific folder, I would like vim to never touch "modified"
timestamp at all.
The background is that I use Bloxsom for blogging, which uses plain text
files in ~/bloxsom as source ...
13
votes
2answers
7k views
How do I do a ls and then sort the results by date created?
In what order are the dated ordered by? Certainly not alphanumeric order.
ls -lt sorts by modification time. But I need creation time.
1
vote
1answer
28 views
SVN wants to commit everything after server re-install
the motherboard of a dedicated server I'm renting since five years went south and the motherboard got replaced by a new one. The very old (Debian) distro couldn't keep up with all the new hardware on ...
5
votes
7answers
807 views
Bash, remove oldest files
I`m trying to delete old files from directory and leave only 3 newest files.
cd /home/user1/test
while [ `ls -lAR | grep ^- | wc -l` < 3 ] ; do
rm `ls -t1 /home/user/test | tail -1`
...
0
votes
2answers
317 views
Correct timeline of a .ts file
I have some MVs that is recorded from a TV, but timeline was incorrect somehow:
Anyone know some tool that can fix it ? The media plays fine, just the displayed stuff doesn't look good
12
votes
3answers
2k views
How to list files that were changed in a certain range of time?
How can I list recursively all files that were changed between 22.12.2011 and 24.12.2011?
4
votes
3answers
262 views
How to get miliseconds since epoch?
I want to do a bash script that measures the launch time of a browser for that I am using an html which gets the time-stamp onload in miliseconds using javascript.
In the shell script just before i ...
2
votes
1answer
87 views
rsync and backup and changing timezone
I back up my pictures from my camera using rsync, using:
rsync -vzrtl --progress --stats --timeout=0 host destination
Now I was in a different timezone when I did my first backup then I moved to a ...
0
votes
2answers
172 views
Solaris 10 modified time
In Solaris 8, when we access the file, the access time changes but modified time remains same. But in Solaris 10, we see that both access and modified time changes when accessing the file. We checked ...
2
votes
2answers
376 views
list all files newer than given timestamp and sort them
I want to list all files (sorted by date) that are newer than timestamp in format 20130207003851 in directory /tmp only. Subdirectories can be omitted.
Using SUSE Linux Enterprise Server 11.
The ...
0
votes
3answers
178 views
Changing the timestamp of a symlink
I know how to change the timestamp of a regular file:
touch -t 201301291810 myfile.txt
I was not able to do the same with a symlink. Is it possible?
Distro: RHEL 5.8
1
vote
1answer
266 views
Validate Unix Timestamp using BASH
My google-fu has failed me so I'm hoping someone here can point me in the right direction. I'm in the middle of doing some data validation efforts and I suspect the system is recording some invalid ...
0
votes
2answers
76 views
I want to add the above date to each line on a prstat log file
I have a prstat log, as you all know the date and time is recorded on the top of the log file, I would like to add that date and time to the begging of each line until it gets to a new date, then I ...
0
votes
1answer
220 views
Whats the most efficient way of adding milliseconds to this code?
#-----------------------------------------------------------------------------
#
# Get time string
#
#-----------------------------------------------------------------------------
#
sub formatTime
...
11
votes
2answers
2k views
Prepending a timestamp to each line of output from a command
I wish to prepend a timestamp to each line of output from a command. For example:
foo
bar
baz
would become
[2011-12-13 12:20:38] foo
[2011-12-13 12:21:32] bar
[2011-12-13 12:22:20] baz
...where ...
1
vote
1answer
93 views
Why ls -lrth and ls -ltch gives different results
I was trying to find the time of database backup. Normally i use
ls -ltch
But this time i used
ls -lrth
It gave me different result for One file and all date-stamps were same for both ...
1
vote
2answers
1k views
Solaris + display file time stamp [year][month][day]
I have Solaris 10 machine
I need to verify time stamp of some file in my Solaris machine
And to get the following format
[year][month][day]
Example of working command on Linux
ls -l ...
5
votes
2answers
2k views
How to find difference between two timestamps up to milliseconds?
I am new to shell scripting. The heart of my script is to find the difference between two timestamps up to milliseconds. With me I have a file with content of timestamps only as
2012-09-13 ...
3
votes
1answer
141 views
How can I get high-precision timestamps (better than 1s) with Samba?
I did a quick test and got the results below. Whats with the horrible time resolution? Is there a way I can make it better?
creation
129971441605098285
mod
129971442166583272
a.ToFileTimeUtc()
...
1
vote
2answers
235 views
Why sudo timestamp is not updated when NOPASSWD is set?
I've set up sudo not to prompt for password by editing the sudoers file:
myuser ALL=(ALL:ALL) NOPASSWD: ALL
And it works fine, running sudo with no password prompting. But when entering sudo -v I ...
3
votes
4answers
498 views
Modification and Access time of a file?
Is it possible to change the file modification time without changing the file acess time?
14
votes
4answers
501 views
Finding command execution time in hindsight
I've just executed a long-running process from the bash prompt. In hindsight, I wish I'd run time on it, or noted down the time at which I kicked it off.
Is there any way of getting this information ...
1
vote
1answer
273 views
rsync error: Time value of file truncated on receiver
I run the following rsync command to back up my data. I am on Ubuntu 12.04.
rsync -rt --delete --links --exclude-from '/home/john/rsync-exclude.txt' /media/data/ server:/backup/data
The data ...
1
vote
2answers
249 views
Remove oldest folders + files (50GB) from a folder when share/HD reaches 95% full capacity
I have a big share (~5TB) that is getting full.
Now I want to make a script that deletes data from 2 specified folders. But this need to be the oldest files/folders and it need to stop when ~50GB has ...
4
votes
3answers
2k views
Display time stamp in dd/mm/yyyy_hh:mm:ss:ms in Unix or Linux
I need help to display date and time in desired format in Unix/ Linux. My desired format is:
dd/mm/yyyy hh:mm:ss:ms in Unix or Linux. I got close using the following command:
echo $(date +%x_%r)
...
1
vote
1answer
256 views
rename files maching specific mtime value within directory
I use simple set of shell commands to in order to create mysqldumps daily. The script is called by cron daemon. It looks like:
presentdate="`date +%d-%m-%Y_%H:%M.%S`"
basedir="/var/db_my_backup"
...
10
votes
3answers
1k views
What file systems on Linux store the creation time?
Are there any (good known, reliable) file systems on Linux that store the creation time of files and directories in the i-node table?
If there are, is the "changed" time replaced by the creation ...
2
votes
2answers
553 views
How do I mass-convert the “last modified” dates in a particular directory?
For example, say, I know that my time-offsets are off by several hours (perhaps because my system clock was a few hours ahead at a certain time). In that case, how would I mass-change the "last ...
2
votes
2answers
130 views
find command for the newest 500 files in a directory tree and also be POSIX compliant
I am looking for a single line shell script or unix command to find the newest 500 files in a directory. Major constraints are it should be POSIX complaint and the directory can have tons of files.
3
votes
1answer
842 views
See if file has been copied to USB
Is there a way to see if a file has been copied to an USB drive?
(Ex: I have the file secret.db and I suppose that my friend has copied it into his USB drive. With stat $filename I cannot see the ...
5
votes
1answer
527 views
Get “date” to understand a timestamp phrase of a different language
My web-scraping scripts have long enjoyed using date -d to read in human-formatted time and date stamps like "March 11, 1999" and convert to any other format I need via the -s parameter.
How might I ...
3
votes
3answers
1k views
How can I change 'change' date of file?
How can I change 'change' date?
$ touch -t 9901010000 test;stat test
File: `test'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: fe01h/65025d Inode: 11279017 ...
3
votes
1answer
548 views
On what occasion will inode change?
I checked manual of find , and there's an option -ctime which specify the last modification time of inode.
But on what occasion would inode change ? When is that option useful ?
12
votes
4answers
2k views
How can I do a “copy if changed” operation?
I would like to copy a set of files from directory A to directory B, with the caveat that if a file in directory A is identical to a file in directory B, that file should not be copied (and thus its ...
4
votes
2answers
697 views
Determine file system timestamp accuracy
File timestamps accuracy is limited to one second for EXT3, one microsecond for UFS, and one nanosecond for EXT4 (at least according to experience). Is there any way to determine this based only on ...
12
votes
6answers
5k views
Correlating /var/log/* timestamps
/var/log/messages, /var/log/syslog, and some other log files use a timestamp which contains an absolute time, like Jan 13 14:13:10.
/var/log/Xorg.0.log and /var/log/dmesg, as well as the output of $ ...
6
votes
6answers
4k views
Shell script for moving oldest files?
How do I write a script for moving just the 20 oldest files from one folder to another? Is there a way to grab the oldest files in a folder?
2
votes
3answers
2k views
How to delete the oldest directory in a given directory? [duplicate]
Possible Duplicate:
Shell script for moving oldest files?
I have a backup directory that stores x other directories that require backuping.
I need something that will run before another ...
5
votes
1answer
1k views
How do I get the difference between two timestamps?
I am creating a simple backup script. I would like to have a message saying "You last backed up x days ago" on login. I can create a file when I do the backup "backup/.last_backup_timestamp" but what ...
2
votes
4answers
189 views
Access the last file (alphabetically) in a directory
I'm trying to open a file with vim from the command line, the file is in a directory filled with automatically generated files that are prepended with a time stamp. Since I don't know the time stamps ...
4
votes
2answers
471 views
Why does Unix store timestamps in a signed integer?
Why is a signed integer used to represent timestamps? There is a clearly defined start at 1970 that's represented as 0, so why would we need numbers before that? Are negative timestamps used anywhere?
...
4
votes
1answer
242 views
Only use mtime comparison with rsync?
Is it possible to sync files via rsync and let rsync only compare mtime informations?
Or is there another tool for this job?
That means that such a tool only copies src to destination if the src is ...
17
votes
3answers
48k views
Get file created/creation time? [duplicate]
Possible Duplicate:
How do I do a ls and then sort the results by date created?
Is there a command in Linux which displays when the file was created ? I see that ls -l gives the last ...
3
votes
1answer
454 views
How to recursively synchronize file timestamps across servers?
Suppose I run an rsync command to mirror a server, but forget to supply the -t option. The mirror will now have different timestamps to the original. What is the easiest way to fix this, without ...
0
votes
0answers
104 views
Commands that affect a file's timestamp [closed]
Which commands that change a file also change its timestamps? Which timestamp is changed in each case?
3
votes
2answers
249 views
On touching a new file why is mtime and ctime older than atime?
I have this:
$ ls -l ff
ls: cannot access ff: No such file or directory
$ touch ff
$ stat ff
File: `ff'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: ...
3
votes
3answers
757 views
Delete files based on year
I need to delete all files in a directory that were created in 2009. What command can I use to do that?
3
votes
2answers
354 views
What can you do to a file without triggering the “Change” Timestamp?
What can you do to a file without triggering the "Change" stat? For instance, it appears that simply changing a bit will trigger Change.





