Tag Info

Hot answers tagged

54

Using the command-line, you have a tool called WMIC, that can be used to ascertain the installation date as follows: CMD /K WMIC OS GET InstallDate You can run this within the command-line or directly from the windows "run". Ps: AFAIK, you can use this since Windows XP. You can easly read the above output adding the relevant markup: 2011-02-14 ...


17

Computer time is often measured from Jan 1 1970 (know as "the epoch"). It's been 40.5 years since then, rounded up to 41.


14

It is possible. The help history command says: If the $HISTTIMEFORMAT variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each displayed history entry. No time stamps are printed otherwise I set the variable for my user like this (on Ubuntu): echo 'export ...


14

Yes. You can even do it over a LAN. The CIFS transaction is TRANS2_QFSINFO and the information level is SMB_QUERY_FS_VOLUME_INFO. The native Windows NT API function for querying a volume's creation time is ZwQueryVolumeInformationFile(), which yields a FILE_FS_VOLUME_INFORMATION data structure (almost identical to the CIFS one, note) when asked for the ...


14

The command is basically called stat. charon:Desktop werner$ stat test 234881026 41570368 -rw-r--r-- 1 werner staff 0 0 "Feb 7 16:03:06 2012" "Feb 7 16:03:06 2012" "Feb 7 16:03:06 2012" "Feb 7 16:03:06 2012" 4096 0 0 test If you want to adjust the format, refer to the manpages, since the output is OS-specific and varies under Linux/Unix. Generally, ...


14

According to this reference, you have a several ways to do that, just choose that one that you love more: How to Determine the Windows Installation Date with and without PowerShell Systeminfo The systeminfo tool displays a lot of interesting information about the computer and the operating system, among them the installation date. Here is some sample ...


13

You can do this with date +%s For more possibilities, see man date


12

One option is to use a shell script or Python/Perl/Ruby script. One option, using Python: #!/usr/bin/env python import time t = time.localtime() # yyyy-mm-dd hh:mm:ss print '%d-%02d-%02d %02d:%02d:%02d' % (t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec) Another, shorter, by @NReilingh, using date (shell script): date "+%Y-%m-%d %T" Use ...


12

Due to William Jackson's answer, I found a similar question on Stack Overflow. The accepted answer states to use Powershell and these commands: $(Get-Item ).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") $(Get-Item ).lastaccesstime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") $(Get-Item ).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")


12

http://en.wikipedia.org/wiki/Stat_(system_call) Criticism of atime Writing to a file changes its mtime and ctime, while reading a file changes its atime. As a result, on a POSIX-compliant system, reading a file causes a write, which has been criticized. This behaviour can usually be disabled by adding a mount option in /etc/fstab. However, turning off ...


11

The "Date" column takes the earlier of "Date created" and "Date modified", ignoring "Date accessed", unless there is a "special" date field such as an Exif-header in a JPG, which takes precedence no matter whether it is before or after other dates present... just as @Richard guessed: The reasoning seems to be that when you copy a file, the "Date created" ...


11

The operators for comparing time stamps are: [ $file1 -nt $file2 ] [ $file1 -ot $file2 ] The mnemonic is easy: 'newer than' and 'older than'.


11

cp -p does the trick.


10

The time zone is an artefact of conversion from "instants" to a human-readable date-and-time in some calendar. Computers do not like human-readable formats (not as much as humans, at least), so they usually store instants in a zone-neutral format. For instance, in the NTFS file system, time stamps are stored in UTC. Hence, the file time modification is ...


9

You wouldn't be able to tell if someone else was reading your files - for example if you had some sensitive data. I can't think of an OS level command that would need last accessed. Backups check last modified and date created for example. But see @mythokia's answer for one case that might. Given that it's disabled by default in Windows 7 (thanks ...


9

See the answers to this question: http://stackoverflow.com/questions/51435/windows-version-of-the-unix-touch-command Specifically, this can be done natively with: copy /b filename.ext +,, This will set the timestamp to the current time. Documentation for the copy command is on TechNet. The commas indicate the omission of the Destination parameter. ...


9

POSIX mv doesn't provide any option to ask for atime/mtime preservation, but as the operation is local to a same volume, you can ask cp to use hard-links instead of copying data of the regular files using the -l option: cp -p -r -l source/date target/ rm -rf source/data Since only directories and file references will be actually copied, it should go much ...


9

You can run the following command in command-line to find the install date: systeminfo | find "Original Install Date" While it would take a couple of seconds to get the result, the output will be very readable: Original Install Date: 7/25/2012, 5:16:47 PM There is more information you can get by running the systeminfo command (like System Boot ...


8

There is no "volume creation date" that I know of built-in to NTFS. However, you should be able to approximate the creation date quite closely by looking at the creation date of the System Volume Information directory in the root of the volume.


8

There are three times on a Unix filesystem, the access time (atime), the modification time (mtime), and the inode change time (ctime). You can change the access time and the modification time with the touch program, for example cp orig copy touch -r orig copy However, you cannot change the inode change time.


7

Some defragmentation programs do use last access as one of the variables of their algorithms. An example would be O&O Defrag.


7

This is not possible. File time is used in Windows API through the FILETIME Structure, described as: Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC). As negative values are not supported, the above date is the starting limit. Conclusion: Your code which tests for earlier dates will never be ...


6

You're asking how to set the ctime value of a file. The only way to do that is to change the system date and then change the file, which is quite a crude method that will probably cause harm to the rest of your system. If you're using ext3 (maybe ext2 and ext4 also?) you can use debugfs to change it, but that requires that you unmount the filesystem first. ...


6

You can use the date command. date >> my_file.txt Where my_file.txt is the file to put the timestamp into. Look at the manual page for strftime(3) (man 3 strftime) to see some date formatters you can use. For instance: date +%l:%M >> my_file.txt Will output something like 9:37 (Hour:Minute) to the text file.


6

They are Unix Epoch millisecond date/time stamps. Here is one converter or you could always write your own. Basically it is the number of milliseconds since 1/1/1970 not counting leap seconds. Assuming you have a UNIX shell handy, they can be converted to any format using the date tool with the argument --date=${epoch_time}, for example: $ date ...


6

You can use Process Explorer to see what time the Notepad was launched. Right click on the process and select Properties....


5

I might be misreading your question but have you tried tar -t -v --full-time -f?


5

Nirsoft to the rescue: try the freeware tool nircmd. It's a bunch of useful tools in one small command line program. One of the commands allows you to specify either or both of created time and modified time, like this: nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56"


5

The find command has an -ls argument, which would provide the functionality you desire: find /path -mtime -60 -ls Good luck.


5

You can sort by "Date Sent" by holding the option key when choosing the Date field in the Sort By menu. Also, selecting "Date Sent" in the View -> Message Attributes menu will cause the date sent to show up in the column view.



Only top voted, non community-wiki answers of a minimum length are eligible