{"id":42828,"date":"2016-09-17T00:30:42","date_gmt":"2016-09-16T15:30:42","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=42828"},"modified":"2016-09-17T00:30:42","modified_gmt":"2016-09-16T15:30:42","slug":"borg","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/borg\/","title":{"rendered":"BORG - \u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u30b5\u30af\u30c3\u3068\u691c\u7d22\u3067\u304d\u308b\u30bf\u30fc\u30df\u30ca\u30eb\u30d9\u30fc\u30b9\u306e\u30b5\u30fc\u30c1\u30a8\u30f3\u30b8\u30f3"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2016\/09\/s-2016-09-17-0.04.45.jpg\" alt=\"S 2016 09 17 0 04 45\" title=\"s 2016-09-17 0.04.45.jpg\" border=\"0\" width=\"855\" height=\"483\" \/><\/p>\n<p>Mac\u3084Linux\u3092\u6709\u52b9\u6d3b\u7528\u3059\u308b\u4e0a\u3067\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u306b\u95a2\u3059\u308b\u77e5\u8b58\u306f\u6b20\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3068\u306f\u3044\u3048\u3042\u307e\u308a\u4f7f\u7528\u983b\u5ea6\u304c\u9ad8\u304f\u306a\u304f\u3001\u305f\u307e\u306b\u4f7f\u7528\u3059\u308b\u7a0b\u5ea6\u3060\u3068\u4f7f\u3044\u65b9\u3092\u5fd8\u308c\u3066\u305d\u306e\u90fd\u5ea6\u30b0\u30b0\u3063\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u65b9\u3082\u591a\u3044\u3053\u3068\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u672c\u65e5\u7d39\u4ecb\u3059\u308b\u300c<a href=\"https:\/\/github.com\/crufter\/borg\">BORG<\/a>\u300d\u306f\u3053\u306e\u3088\u3046\u306a\u60a9\u307f\u3092\u8efd\u6e1b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3001\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u5c02\u7528\u306e\u30b5\u30fc\u30c1\u30a8\u30f3\u30b8\u30f3\u3067\u3059\u3002\u308f\u3056\u308f\u3056\u30d6\u30e9\u30a6\u30b6\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u5185\u3067\u7d20\u65e9\u304f\u76ee\u7684\u306e\u64cd\u4f5c\u3092\u3055\u304c\u3057\u3060\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u5b9f\u969b\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h2>\n<p>Borg\u306fGo\u8a00\u8a9e\u3067\u4f5c\u3089\u308c\u305f\u30c4\u30fc\u30eb\u306a\u306e\u3067Go\u306e\u5b9f\u884c\u74b0\u5883\u304c\u6e96\u5099\u3067\u304d\u3066\u3044\u308b\u306a\u3089\u3070\u300cgo get\u300d\u306b\u3088\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>go get github.com\/crufter\/borg<\/pre>\n<p>\u307e\u305f\u30d3\u30eb\u30c9\u7528\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059(Linux\u306e\u5834\u5408)<\/p>\n<pre>wget https:\/\/github.com\/crufter\/borg\/blob\/master\/builds\/borg_linux_amd64\\?raw\\=true -O \/usr\/local\/bin\/borg\nchmod 755 \/usr\/local\/bin\/borg<\/pre>\n<p>\u305d\u306e\u4ed6\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u5411\u3051\u306e\u30d3\u30eb\u30c9\u6e08\u307f\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u304c\u5fc5\u8981\u306a\u5834\u5408\u3001\u4ee5\u4e0b\u306eURL\u30ab\u30e9\u9069\u5207\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/crufter\/borg\/tree\/master\/builds\">https:\/\/github.com\/crufter\/borg\/tree\/master\/builds<\/a><\/p>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>Borg\u306b\u691c\u7d22\u3057\u305f\u3044\u6587\u5b57\u3092\u5f15\u6570\u3068\u3057\u3066\u4e0e\u3048\u308c\u3070\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u542b\u307e\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u3001\u300cborg \"list all files in dir\"\u300d\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>\n$ borg \"list all files in dir\"\n(1) create list of all files in every subdirectories in bash\n        [11] find . -type f -exec md5 {} \\;\n        [12] #!\/bin\/sh\n             DIR=${1:-`pwd`}\n             SPACING=${2:-|}\n             cd $DIR\n             for x in * ; do\n                 [ -d \"$DIR\/$x\" ] &&  echo \"$SPACING\\`-{$x\" && $0 \"$DIR\/$x\" \"$SPACING  \" || \\\n                 echo \"$SPACING $x : MD5=\" && md5sum \"$DIR\/$x\"\n             done\n\n(2) Bash: How to list only files?\n        [21] find . -maxdepth 1 -type f\n        [22] ls -l | egrep -v '^d'\n             ls -l | grep -v '^d'\n        [23]     find * -maxdepth 0 -type f  # find -L * ... includes symlinks to files\n             -\n             fls f        # list all files in current dir.\n             fls d -tA ~  #  list dirs. in home dir., including hidden ones, most recent first\n             fls f^l \/usr\/local\/bin\/c* # List matches that are files, but not (^) symlinks (l)\n             -\n             [sudo] npm install fls -g\n        [24] find . -maxdepth 1 -type f|ls -lt|less\n<\/pre>\n<p>find\u3084\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3001ls\u3068grep\u306e\u7d44\u307f\u5408\u308f\u305b\u7b49\u3001\u3044\u308d\u3044\u308d\u306a\u56de\u7b54\u4f8b\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u8a18\u53f7\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>()\u306f\u8cea\u554f\u306b\u5bfe\u3059\u308b\u30d2\u30c3\u30c8\u3092\u8868\u3059<\/li>\n<li>[]\u306f\u53ef\u80fd\u6027\u306e\u3042\u308b\u89e3\u6c7a\u7b56\u3092\u8868\u3059<\/li>\n<li>[]\u306e\u4e0b\u306e...\u306f\u3055\u3089\u306b\u8868\u793a\u3059\u308b\u5185\u5bb9\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3092\u8868\u3059<\/li>\n<li>-\u306f\u3001\u540c\u3058\u60c5\u5831\u6e90\u304b\u3089\u306e\u62bd\u51fa\u3055\u308c\u305f\u5225\u306e\u30b3\u30fc\u30c9\u4f8b\u3092\u8868\u3059<\/li>\n<\/ul>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306fborg.crufter.com\u306b\u63a5\u7d9a\u3057\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u81ea\u5206\u3067\u8a2d\u7f6e\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u8a73\u7d30\u306fdaemon\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u4ee5\u4e0b\u306e\u30d5\u30e9\u30b0\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059<\/p>\n<pre>\n-f  (= false)\n    Print full results, ie. no more '...'\n-h (= \"borg.crufter.com\")\n    Server to connect to\n-l  (= 5)\n    Result list limit. Defaults to 5\n-p  (= false)\n    Private search. Your search won't leave a trace. Pinky promise. Don't use this all the time if you want to see the search result relevancy improved\n<\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u8a18\u4e8b\u57f7\u7b46\u6642Borg\u306f\u307e\u3060\u958b\u767a\u306e\u521d\u671f\u6bb5\u968e\u3068\u3055\u308c\u3001\u4eca\u5f8c\u6570\u9031\u9593\u306e\u3046\u3061\u306b\u691c\u7d22\u7d50\u679c\u306e\u95a2\u9023\u6027\u306e\u6539\u5584\u3084\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3001\u305d\u306e\u4ed6\u6a5f\u80fd\u306e\u8ffd\u52a0\u7b49\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u304c\u4e88\u544a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u3044\u65b9\u3092\u6bce\u56de\u691c\u7d22\u3059\u308b\u306e\u304c\u3081\u3093\u3069\u304f\u3055\u3044\u3068\u601d\u3063\u3066\u3044\u308b\u65b9\u306f\u4f7f\u7528\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac\u3084Linux\u3092\u6709\u52b9\u6d3b\u7528\u3059\u308b\u4e0a\u3067\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u306b\u95a2\u3059\u308b\u77e5\u8b58\u306f\u6b20\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3068\u306f\u3044\u3048\u3042\u307e\u308a\u4f7f\u7528\u983b\u5ea6\u304c\u9ad8\u304f\u306a\u304f\u3001\u305f\u307e\u306b\u4f7f\u7528\u3059\u308b\u7a0b\u5ea6\u3060\u3068\u4f7f\u3044\u65b9\u3092\u5fd8\u308c\u3066\u305d\u306e\u90fd\u5ea6\u30b0\u30b0\u3063\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u65b9\u3082\u591a\u3044\u3053\u3068\u3067\u3057\u3087\u3046\u3002 \u672c\u65e5\u7d39\u4ecb\u3059 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":42829,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[3459],"tags":[1360,1383,1211],"class_list":["post-42828","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-review","tag-bash","tag-shell","tag-terminal"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/42828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=42828"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/42828\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/42829"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=42828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=42828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=42828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}