history 1.7 KB

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