whio  Update of "whio_epfs_touch"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: b92f73acf9fab5e8a8f949305c2cfc92ec1519af
Page Name:whio_epfs_touch
Date: 2011-05-23 18:50:56
Original User: stephan
Parent: 745af97aff055c6123869ff8c5f943ccad15c743
Content

ACHTUNG: AS OF 20110523, THIS PAGE IS NOW MAINTAINED IN THE NEW WIKI: http://whiki.wanderinghorse.net/wikis/whio/?page=whio_epfs_touch

See also: whio_epfs_tools

whio-epfs-touch

whio-epfs-touch is a tool for modifying timestamps of entries in whio_epfs container files. In addition to the common tools arguments, it supports the following arguments:

  • inode IDs can be given in the form ### (individual IDs) or ###-### (inclusive ranges, starting at 1). When specifying a range, use the value 0 as the second number to mean "until the end."
  • -t or --time, in a format compatible with --format. Optionally it may be the special value now.
  • -f or --format is a strptime(3)-compatible string which specifies the format used by the --time parameter. The default is %Y%m%d%H%M%S.
  • -E or --epoch equivalent to --format="%s" (Unix Epoch format, but this is a glibc extension to strptime(3).)
  • --no-create or -c disable the creation of new length-zero entries via touching. Trying to touch an unused inode will cause an error in this case.
  • --blinking-midnight or -0 (the number zero) means to set the timestamp to the start of the Unix epoch.

The time format string must be compatible with the system's strptime(3) C API, and the time value must conform to that format string. The default format is almost compatible with Unix-conventional touch: YYYYmmddHHMMSS.

Examples

~> whio-epfs-ls my.epfs 
Inode #	   Size	  Flags      Modification Time
1         19887   00000000   2003-03-03 00:00:00
2          9836   00000000   2010-02-16 01:14:34
3         25051   00000000   2003-03-03 00:00:00
4           326   00000000   2010-02-15 23:28:29
...

~> whio-epfs-touch my.epfs 1 3  # uses the current time, same as using --time=now
~> whio-epfs-ls my.epfs
Inode #	   Size	  Flags      Modification Time
1         19887   00000000   2010-02-16 01:26:31  <--- here
2          9836   00000000   2010-02-16 01:14:34
3         25051   00000000   2010-02-16 01:26:31  <--- here
4           326   00000000   2010-02-15 23:28:29
...

~> whio-epfs-touch -f'%Y%m%d' -t20201121 my.epfs 2
~> whio-epfs-ls my.epfs
Inode #	   Size	  Flags      Modification Time
1         19887   00000000   2010-02-16 01:26:31
2          9836   00000000   2020-11-21 00:00:00  <--- here
3         25051   00000000   2010-02-16 01:26:31
...

~> whio-epfs-touch -t20090909090909 my.epfs 1
~> whio-epfs-ls my.epfs
Inode #	   Size	  Flags      Modification Time
1         19887   00000000   2009-09-09 10:09:09  <---- see notes below!
...

# Touch a range of inodes all at once:
~> whio-epfs-touch my.epfs 3-7 9-17

# Touch all inodes using the special range n-0 (means from n until the end):
~> whio-epfs-touch my.epfs 1-0

Note that the reported time in one of the examples is off by one hour! This has to do with deep, dark details of time zones, locales, daylight-savings time, time conversions, and other sorts of voodoo about which i know little.