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 -vDufN
  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, while
  57. .B -b
  58. runs
  59. .IR diff
  60. .BR -nb .
  61. .PP
  62. The
  63. .B -u
  64. option causes times to be printed in GMT (UT) rather than local time.
  65. .PP
  66. The
  67. .B -d
  68. option selects some other dump file system such as
  69. .IR /n/bootesdump .
  70. .PP
  71. The
  72. .B -f
  73. option forces the search to continue even when the
  74. file in question does not exist (useful for files that only
  75. exist intermittently).
  76. .PP
  77. Finally, the
  78. .B -s
  79. option
  80. sets the starting (most recent) date for the output.
  81. .SH EXAMPLES
  82. .PP
  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)