history 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. .TH HISTORY 1
  2. .SH NAME
  3. history \- print file names from the dump
  4. .SH SYNOPSIS
  5. .B history
  6. [
  7. .B -Dabcemnw
  8. ] [
  9. .B -fuv
  10. ] [
  11. .B -d
  12. .I dumpfilesystem
  13. ] [
  14. .B -s
  15. .I yyyymmdd
  16. ]
  17. .I files ...
  18. .SH DESCRIPTION
  19. .I History
  20. prints the names, dates, and sizes, and modifier of all versions of the named
  21. .IR files ,
  22. looking backwards in time,
  23. stored in the dump file system.
  24. If the file exists in the main tree, the first line of output will be its current state.
  25. For example,
  26. .IP
  27. .EX
  28. history /adm/users
  29. .EE
  30. .PP
  31. produces
  32. .IP
  33. .EX
  34. May 14 15:29:18 EDT 2001 /adm/users 10083 [adm]
  35. May 14 15:29:18 EDT 2001 /n/dump/2001/0515/adm/users 10083 [adm]
  36. May 11 17:26:24 EDT 2001 /n/dump/2001/0514/adm/users 10481 [adm]
  37. May 10 16:40:51 EDT 2001 /n/dump/2001/0511/adm/users 10476 [adm]
  38. ...
  39. .EE
  40. .PP
  41. When presented with a path of the form
  42. .BI /n/ fs / path \fR,
  43. .I history
  44. will use
  45. .IB fs dump
  46. as the name of the dump file system, and will print a history of
  47. .IR path .
  48. .PP
  49. The
  50. .B -v
  51. option enables verbose debugging printout.
  52. .PP
  53. The
  54. .B -D
  55. option causes
  56. .IR diff (1)
  57. to be run for each adjacent pair of dump files.
  58. The options
  59. .B -abcemnw
  60. are passed through to
  61. .IR diff;
  62. the little-used
  63. .I diff option
  64. .B -f
  65. is replaced by the functionality described below,
  66. and the
  67. .B -r
  68. option is disallowed.
  69. .PP
  70. The
  71. .B -u
  72. option causes times to be printed in GMT (UT) rather than local time.
  73. .PP
  74. The
  75. .B -d
  76. option selects some other dump file system such as
  77. .IR /n/bootesdump .
  78. .PP
  79. The
  80. .B -f
  81. option forces the search to continue even when the
  82. file in question does not exist (useful for files that only
  83. exist intermittently).
  84. .PP
  85. Finally, the
  86. .B -s
  87. option
  88. sets the starting (most recent) date for the output.
  89. .SH EXAMPLES
  90. Check how often a user has been logged in.
  91. .IP
  92. .EX
  93. history /usr/ches/tmp
  94. .EE
  95. .SH FILES
  96. .B /n/dump
  97. .SH SOURCE
  98. .B /sys/src/cmd/history.c
  99. .SH SEE ALSO
  100. .IR fs (4)
  101. .br
  102. .IR yesterday (1)