{"id":120284,"date":"2024-03-31T10:00:41","date_gmt":"2024-03-31T01:00:41","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=120284"},"modified":"2024-03-31T07:57:54","modified_gmt":"2024-03-30T22:57:54","slug":"finding-stuff-in-the-terminal","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/finding-stuff-in-the-terminal\/","title":{"rendered":"\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u300c\u30e2\u30ce\u300d\u3092\u63a2\u3059\u3044\u308d\u3044\u308d\u306a\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/03\/s_20240330_133753.jpg\" alt=\"S 20240330 133753\" title=\"s_20240330_133753.jpg\" border=\"0\" width=\"860\" height=\"560\" \/><\/p>\n<p>\u958b\u767a\u8005\u306e\u65b9\u306f\u4ee5\u524d\u81ea\u5206\u304c\u4f5c\u6210\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084\u3001\u53c2\u8003\u306e\u305f\u3081\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u4e2d\u304b\u3089\u3001\u3055\u307e\u3056\u307e\u306a\u60c5\u5831\u3092\u65e5\u5e38\u7684\u306b\u63a2\u3057\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u95a2\u6570\u540d\u3084\u5909\u6570\u540d\u3001\u30d5\u30a1\u30a4\u30eb\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u7b49\u3092\u63a2\u3059\u4e8b\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u5834\u3057\u306e\u304e\u306e\u529b\u696d\u3067\u306f\u306a\u304f\u3001\u52b9\u7387\u7684\u306b\u691c\u7d22\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3084\u65b9\u6cd5\u3092\u77e5\u3063\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u958b\u767a\u8005\u306eMaciek Flak\u6c0f\u306f\u3001\u305d\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u5f79\u7acb\u3064\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u3055\u307e\u3056\u306a\u300c\u30e2\u30ce\u300d\u3092\u63a2\u3059\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u305f\u30d6\u30ed\u30b0\u8a18\u4e8b\u300c<a href=\"https:\/\/flakm.com\/posts\/finding_stuff\/\">Finding stuff in the terminal<\/a>\u300d\u3092\u516c\u958b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u540c\u6c0f\u304c\u7d39\u4ecb\u3057\u305f\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<h2>\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u52b9\u7387\u826f\u304f\u691c\u7d22<\/h2>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u691c\u7d22\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3084\u65b9\u6cd5\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u3082\u306e\u304c\u30ea\u30b9\u30c8\u30a2\u30c3\u30d7\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u6587\u5b57\u5217\u3092\u63a2\u3059<code>grep<\/code>\u3002\u6307\u5b9a\u3055\u308c\u305f\u6587\u5b57\u5217\u306b\u30de\u30c3\u30c1\u3059\u308b\u884c\u3092\u8868\u793a\u3059\u308b\u3002\n<pre>\u276f grep -i atuin **\/*.nix<\/pre>\n<\/li>\n<li>\u30e2\u30c0\u30f3\u306agrep\u306e\u4ee3\u66ff\u30c4\u30fc\u30eb<code><a href=\"https:\/\/github.com\/BurntSushi\/ripgrep\">ripgrep<\/a><\/code>\u3002\u6307\u5b9a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306b\u542b\u307e\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u7d20\u65e9\u304f\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\n<pre>\r\n\u276f rg atuin\r\n<\/pre>\n<li><code>rg<\/code>\u3068<code><a href=\"https:\/\/github.com\/jez\/as-tree\">as-tgree<\/a><\/code>\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u3092\u53ef\u8996\u5316\u3002rg\u306e\u7d50\u679c\u3092\u30c4\u30ea\u30fc\u5f62\u5f0f\u3067\u8868\u793a\u3067\u304d\u308b\u3002\n<pre>\r\n\u276f rg rust -l | as-tree\r\n.\r\n\u251c\u2500\u2500 README.md\r\n\u251c\u2500\u2500 configuration.nix\r\n\u251c\u2500\u2500 flake.lock\r\n\u251c\u2500\u2500 home-manager\r\n\u2502   \u251c\u2500\u2500 amd-pc.nix\r\n\u2502   \u251c\u2500\u2500 dell-xps.nix\r\n\u2502   \u2514\u2500\u2500 modules\r\n\u2502       \u251c\u2500\u2500 i3.nix\r\n\u2502       \u251c\u2500\u2500 nvim\r\n\u2502       \u2502   \u251c\u2500\u2500 config\r\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 init.vim\r\n\u2502       \u2502   \u2502   \u251c\u2500\u2500 lsp-config.vim\r\n\u2502       \u2502   \u2502   \u2514\u2500\u2500 rust-config.lua\r\n\u2502       \u2502   \u2514\u2500\u2500 neovim.nix\r\n\u2502       \u251c\u2500\u2500 rust.nix\r\n\u2502       \u2514\u2500\u2500 zsh.nix\r\n\u2514\u2500\u2500 hosts\r\n    \u251c\u2500\u2500 amd-pc\r\n    \u2502   \u251c\u2500\u2500 configuration.nix\r\n    \u2502   \u2514\u2500\u2500 postgres.nix\r\n    \u251c\u2500\u2500 dell-xps\r\n    \u2502   \u2514\u2500\u2500 configuration.nix\r\n    \u2514\u2500\u2500 odroid\r\n        \u251c\u2500\u2500 nextcloud.nix\r\n        \u2514\u2500\u2500 postgres.nix\r\n<\/pre>\n<\/li>\n<li><code>git<\/code>\u3067\u5c65\u6b74\u3092\u78ba\u8a8d\u3002-G\u3084-p\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057\u3066git\u306e\u5c65\u6b74\u304b\u3089\u691c\u7d22\u3067\u304d\u308b\u3002\n<pre>\r\n# -G (grep) Look for differences whose patch text contains added\/removed lines that match\r\n# -p (patch) generate patch\r\n\u276f git log -G _atuin_search_widget -p\r\n<\/pre>\n<\/li>\n<li>\u30e2\u30c0\u30f3\u306agit dff\u30da\u30fc\u30b8\u30e3\u30fc<code><a href=\"https:\/\/github.com\/dandavison\/delta\">delta<\/a><\/code>\u3002git\u306e\u30da\u30fc\u30b8\u30e3\u30fc\u3068\u3057\u3066delta\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067git\u306ediff\u3084log\u306e\u51fa\u529b\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n<img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/03\/git_log_delta.jpg\" alt=\"Git log delta\" title=\"git_log_delta.jpg\" border=\"0\" width=\"1280\" height=\"1386\" \/><\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u691c\u7d22\u3059\u308b<code>find<\/code>\u3068<code>fd<\/code>\u3002find\u3092\u4f7f\u3063\u3066\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002fd\u306ffind\u306e\u30e2\u30c0\u30f3\u7248\u3002\n<pre>\r\nfind . -name \"*atuin*.nix\"\r\n.\/home-manager\/modules\/atuin.nix\r\n<\/pre>\n<\/li>\n<li>\u30b7\u30a7\u30eb\u5c65\u6b74\u304b\u3089\u691c\u7d22\u3059\u308b<code>atuin<\/code>\u3002<a href=\"https:\/\/softantenna.com\/blog\/atuin\/\">atuin<\/a>\u306f\u30b7\u30a7\u30eb\u5c65\u6b74\u3092SQLite\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3002\u3042\u3044\u307e\u3044\u691c\u7d22\u3084\u4ed6\u306e\u30de\u30b7\u30f3\u3068\u306e\u540c\u671f\u3082\u53ef\u80fd\u3002<br \/>\n<img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/02\/s_20240223_135946.jpg\" alt=\"S 20240223 135946\" title=\"s_20240223_135946.jpg\" border=\"0\" width=\"860\" height=\"560\" \/>\n<\/li>\n<li>\u30ef\u30fc\u30ad\u30f3\u30b0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5909\u66f4\u3059\u308b<code><a href=\"https:\/\/github.com\/ajeetdsouza\/zoxide\">zoxide<\/a><\/code>\u3002\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5909\u66f4\u3092\u652f\u63f4\u3059\u308b\u5c0f\u3055\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3067\u3001\u983b\u7e41\u306b\u8a2a\u308c\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4fdd\u5b58\u3057\u3001\u30d5\u30eb\u30d1\u30b9\u3092\u899a\u3048\u3066\u3044\u306a\u304f\u3066\u3082\u30b8\u30e3\u30f3\u30d7\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002\n<pre>\r\nz ripgrep\r\n<\/pre>\n<\/li>\n<li>\u30c7\u30a3\u30b9\u30af\u30b9\u30da\u30fc\u30b9\u3092\u6d88\u8cbb\u3057\u3066\u3044\u308b\u30e2\u30ce\u3092\u63a2\u3059\u3002ncdu\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082du\u30b3\u30de\u30f3\u30c9\u3067\u3082\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002<a href=\"https:\/\/github.com\/bootandy\/dust\">dust<\/a>\u306f\u305d\u306e\u30e2\u30c0\u30f3\u7248\u3002\n<pre>\r\ndu -h ~ | sort -hr | head -n 10\r\n<\/pre>\n<\/li>\n<\/ul>\n<p>\u500b\u4eba\u7684\u306b\u306f\u77e5\u3063\u3066\u3044\u308b\u3082\u306e\u3082\u3042\u308c\u3070\u3001as-tgree\u3084delta\u3001zoxide\u3001dust\u306a\u3069\u77e5\u3089\u306a\u3044\u3082\u306e\u3082\u3042\u308a\u307e\u3057\u305f\u3002\u5168\u3066\u3092\u4e00\u5ea6\u306b\u899a\u3048\u308b\u306e\u306f\u5927\u5909\u3067\u3059\u306e\u3067\u3001\u6c17\u306b\u306a\u308b\u3082\u306e\u304b\u3089\u5c11\u3057\u3065\u3064\u8a66\u3057\u3066\u3044\u304f\u3068\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u958b\u767a\u8005\u306e\u65b9\u306f\u4ee5\u524d\u81ea\u5206\u304c\u4f5c\u6210\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084\u3001\u53c2\u8003\u306e\u305f\u3081\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u4e2d\u304b\u3089\u3001\u3055\u307e\u3056\u307e\u306a\u60c5\u5831\u3092\u65e5\u5e38\u7684\u306b\u63a2\u3057\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\u95a2\u6570\u540d\u3084\u5909\u6570\u540d\u3001\u30d5\u30a1\u30a4\u30eb\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u7b49\u3092\u63a2\u3059\u4e8b\u304c\u3042\u308b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":120296,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[2047],"tags":[1211],"class_list":["post-120284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","tag-terminal"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/120284","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=120284"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/120284\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/120296"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=120284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=120284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=120284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}