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 |