FileComment (https://github.com/ChanningBJ/FileComment) 是一個爲文件加註釋的工具。git
對於一些大文件(例如數據庫備份)以及可執行文件,咱們有時但願能記錄文件的用途,但不想把文件的名字弄得太長,FileComment 能夠幫助解決這一問題。使用方式也很簡單。github
爲文件添加註釋:數據庫
fcomment -a FILENAME
會調用默認的編輯器讓用戶輸入註釋內容。編輯器
也可使用-m選項指定:工具
fcomment -a FILENAME -m 'Comment message'
顯示文件的註釋(默認只顯示最新的一條註釋):code
$ fcomment * | File Name | Comment | Added Time | |-------------+------------------------------+---------------------| | file1 | 100000 user data | 2014-04-01 15:25:15 | | path1 | DB backup after create index | 2014-04-01 15:24:31 |
也可使用-f選項顯示一個文件全部的註釋:it
$ fcomment -f file1 | File Name | Comment | Added Time | |-------------+------------------+---------------------| | file1 | Comment update | 2014-04-01 15:30:19 | | file1 | 100000 user data | 2014-04-01 15:25:15 |