![]() If you’re interested in updating the modification date only, use -m option: ubuntu$ touch -mt 200510161000. Touch timer update#Similar to the commands above, you can use -a option to make touch only update the access time field of a file: ubuntu$ touch -at 200010161000. Here’s how easy it is to set atime and mtime to the Oct 16th, 2010 date: ubuntu$ touch -t 201010161000. If you fancy adding a year to the timestamp specification, you can specify something from both past and future. In other words, it’s set to Nov 18th 2008 because of the date of writing this example. The reason change time (ctime) is set to a different date is because this field reflects the last update to the inode behind a file, and always reflects the current time. tryĪs you can see from the output, both access time and modification time got updated. This example resets the date to October 16th: ubuntu$ touch -t 10161000. Touch timer full#Template for the timestamp is quite thorough: YY]MMDDhhmm, but it’s entirely up to you whether to specify the year (either two-digit or a full form) or not. If you have a specific time and date you would like to be used for all the timestamps of a file or directory, touch command will gladly accempt a timestamp template with -t command line option. Changing file timestamps to a specific date and time Size: 0 Blocks: 0 IO Block: 4096 regular empty fileĭevice: 801h/2049d Inode: 655596 Links: 1Īccess: (0644/-rw-r-r-) Uid: ( 1000/ greys) Gid: ( 113/ admin)Īs you can see from the example, the file which isn’t originally found, gets created by the touch command and gets its timestamps set to the current system time and date. If there isn’t a file with the specified name, touch command will create it for you if permissions allow it: ubuntu$ ls try You simply specify the filename as a command line parameter, no oother options are needed. The default behavior of touch command is to change all three timestamps associated with a file to the current system time. Changing timestamps of a time to the current system time ![]() Ranging from source control approaches to storage usage analysis, there are processes out there which rely on the timestamps associated with each file and directory of yours.Īfter all, it’s always useful to know when the file was last modified or when somebody tried to access its contents. There are quite a few legitimate reasons why you may want to update timestamps on a certain file. ![]() In short, it updates file timestamps – access and modification ones (atime and mtime respectively). ![]() It's really ideal for any electronic device.Touch command is one of these little but extremely useful tools in Unix and Linux which you may have used for quite sometime before realizing their full potential. Simply press the button to set the timer to the appropriate time, and your done! Works great with iPhone, iPad, Macbook, Samsung Galaxy Note, Samsung Tables, or any Samsung battery powered device. Simple Touch timers are designed to shut-off automatically at whatever time you designate. Overcharging your device's battery can have some costly and negative effects such as decreased battery life, decreased device life, or even worse. ![]() Simple Touch Overcharge Prevention Timers were designed with your best interest in mind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |