取消
顯示結果 
搜尋替代 
您的意思是: 

如何找到超過特定版本的檔案

如何找到超過特定版本的檔案

假設我要找到所有檔案版本超過20000的

我要怎樣做,有這樣的指令嗎
1 回覆

如何找到超過特定版本的檔案

沒有這樣的指令, 但可用 lexicial functions 輕易做到.



$ type aaa.com

$!

$! search oper*.log;* for version_num >= 30 in current directory

$!

$start:

$ name = F$SEARCH ("oper*.log;*")

$ if name .eqs. "" then goto done

$ version=f$element(1,";",name)

$ if version .ge. "30" then sh sym name

$ goto start

$done:

$ exit



$ dir oper*.log



Directory SYS$SYSROOT:



OPERATOR.LOG;39 OPERATOR.LOG;38 OPERATOR.LOG;37 OPERATOR.LOG;36

OPERATOR.LOG;35 OPERATOR.LOG;34 OPERATOR.LOG;33 OPERATOR.LOG;32

OPERATOR.LOG;31 OPERATOR.LOG;30 OPERATOR.LOG;29 OPERATOR.LOG;28



Total of 12 files.

$ @aaa

NAME = "SYS$SYSROOT:OPERATOR.LOG;39"

NAME = "SYS$SYSROOT:OPERATOR.LOG;38"

NAME = "SYS$SYSROOT:OPERATOR.LOG;37"

NAME = "SYS$SYSROOT:OPERATOR.LOG;36"

NAME = "SYS$SYSROOT:OPERATOR.LOG;35"

NAME = "SYS$SYSROOT:OPERATOR.LOG;34"

NAME = "SYS$SYSROOT:OPERATOR.LOG;33"

NAME = "SYS$SYSROOT:OPERATOR.LOG;32"

NAME = "SYS$SYSROOT:OPERATOR.LOG;31"

NAME = "SYS$SYSROOT:OPERATOR.LOG;30"

$