{"id":348,"date":"2024-01-22T20:09:47","date_gmt":"2024-01-22T12:09:47","guid":{"rendered":"https:\/\/boostup.cf\/?p=348"},"modified":"2025-10-14T17:42:23","modified_gmt":"2025-10-14T09:42:23","slug":"linux%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/189505.xyz\/?p=348","title":{"rendered":"linux\u547d\u4ee4"},"content":{"rendered":"<p>rsync<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_40 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" area-label=\"ez-toc-toggle-icon-1\"><label for=\"item-6a1cc9cfb4a36\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;direction:ltr;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><input  type=\"checkbox\" id=\"item-6a1cc9cfb4a36\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/189505.xyz\/?p=348\/#rsync%E6%8E%92%E9%99%A4%E4%B8%80%E4%BA%9B%E6%96%87%E4%BB%B6%E5%92%8C%E7%9B%AE%E5%BD%95\" title=\"\nrsync\u6392\u9664\u4e00\u4e9b\u6587\u4ef6\u548c\u76ee\u5f55 \n\">\nrsync\u6392\u9664\u4e00\u4e9b\u6587\u4ef6\u548c\u76ee\u5f55 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/189505.xyz\/?p=348\/#%E8%BF%9C%E7%A8%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%89%A7%E8%A1%8C%E5%91%BD%E4%BB%A4%EF%BC%8C%E6%9C%AC%E5%9C%B0%E6%A1%8C%E9%9D%A2%E5%9C%A8%E5%91%BD%E4%BB%A4%E7%BB%93%E6%9D%9F%E5%90%8E%E6%94%B6%E5%88%B0%E9%80%9A%E7%9F%A5\" title=\"\n\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u547d\u4ee4\uff0c\u672c\u5730\u684c\u9762\u5728\u547d\u4ee4\u7ed3\u675f\u540e\u6536\u5230\u901a\u77e5 \n\">\n\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u547d\u4ee4\uff0c\u672c\u5730\u684c\u9762\u5728\u547d\u4ee4\u7ed3\u675f\u540e\u6536\u5230\u901a\u77e5 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/189505.xyz\/?p=348\/#linux%E6%89%93%E5%8D%B0%E6%89%80%E6%9C%89%E7%BA%BF%E7%A8%8B%E7%9A%84%E5%90%8D%E7%A7%B0\" title=\"\nlinux\u6253\u5370\u6240\u6709\u7ebf\u7a0b\u7684\u540d\u79f0 \n\">\nlinux\u6253\u5370\u6240\u6709\u7ebf\u7a0b\u7684\u540d\u79f0 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/189505.xyz\/?p=348\/#rpm%E5%91%BD%E4%BB%A4\" title=\"\nrpm\u547d\u4ee4 \n\">\nrpm\u547d\u4ee4 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/189505.xyz\/?p=348\/#docker\" title=\"\ndocker \n\">\ndocker \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/189505.xyz\/?p=348\/#how_to_change_access_time_of_file\" title=\"\nhow to change access time of file \n\">\nhow to change access time of file \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/189505.xyz\/?p=348\/#ffmpeg_merge_video\" title=\"\nffmpeg merge video \n\">\nffmpeg merge video \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/189505.xyz\/?p=348\/#find%E6%8E%92%E9%99%A4%E6%96%87%E4%BB%B6\" title=\"\nfind\u6392\u9664\u6587\u4ef6 \n\">\nfind\u6392\u9664\u6587\u4ef6 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/189505.xyz\/?p=348\/#grep%E6%8E%92%E9%99%A4%E6%96%87%E4%BB%B6%E5%92%8C%E7%9B%AE%E5%BD%95%EF%BC%8C%E6%96%87%E4%BB%B6%E4%B8%8D%E5%9C%A8%E6%A0%B9%E7%9B%AE%E5%BD%95\" title=\"\ngrep\u6392\u9664\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u6587\u4ef6\u4e0d\u5728\u6839\u76ee\u5f55 \n\">\ngrep\u6392\u9664\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u6587\u4ef6\u4e0d\u5728\u6839\u76ee\u5f55 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/189505.xyz\/?p=348\/#ssh_new_host_key_check\" title=\"ssh new host key check\">ssh new host key check<\/a><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"rsync%E6%8E%92%E9%99%A4%E4%B8%80%E4%BA%9B%E6%96%87%E4%BB%B6%E5%92%8C%E7%9B%AE%E5%BD%95\"><\/span>\nrsync\u6392\u9664\u4e00\u4e9b\u6587\u4ef6\u548c\u76ee\u5f55<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<pre><code>exclude.txt:\nkrp_gpu_uni_predict_server\/tools\/log-collector\/logs\/stderr.log*\nkrp_gpu_uni_predict_server\/tools\/log-collector\/logs\/stdout.log*\nkrp_gpu_uni_predict_server\/tools\/core-collector\/logs\/stderr.log*\nkrp_gpu_uni_predict_server\/tools\/core-collector\/logs\/stdout.log*\nkrp_gpu_uni_predict_server\/data\/item_doc.binlog*\nkrp_gpu_uni_predict_server\/data\/item_doc*.binlog\nkrp_gpu_uni_predict_server\/data\/item_doc*.binlog.tmp\nkrp_gpu_uni_predict_server\/bin\/supervise\/control\nkrp_gpu_uni_predict_server\/bin\/supervise\/ok\n*.backtrace\nbin\/krp_gpu_uni_predict_server\nbin\/perfutil.log.*\nkrp_gpu_uni_predict_server\/log\n\ncmd:\nrsync -acvP --exclude-from=exclude.txt krp_gpu_uni_predict_server mig\n<\/code><\/pre>\n<h1><span class=\"ez-toc-section\" id=\"%E8%BF%9C%E7%A8%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%89%A7%E8%A1%8C%E5%91%BD%E4%BB%A4%EF%BC%8C%E6%9C%AC%E5%9C%B0%E6%A1%8C%E9%9D%A2%E5%9C%A8%E5%91%BD%E4%BB%A4%E7%BB%93%E6%9D%9F%E5%90%8E%E6%94%B6%E5%88%B0%E9%80%9A%E7%9F%A5\"><\/span>\n\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u547d\u4ee4\uff0c\u672c\u5730\u684c\u9762\u5728\u547d\u4ee4\u7ed3\u675f\u540e\u6536\u5230\u901a\u77e5<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u547d\u4ee4<\/p>\n<pre><code>source teams\/reco-arch\/uni-predict-v2\/build\/custom-tf2-cpu.sh &amp;&amp; ENABLE_DISTCC=true OPTIMIZATION_LEVEL=-O3 nohup sh -c &quot;kbuild build  -v dragon\/server\/BUILD --targets=opt --base_tag=HEAD_GCC10_LLD &gt; tmp\/.build.log.`nowstr.sh` 2&gt;&amp;1 ; echo &#039;cpu done&#039; &gt; \/tmp\/notify.txt ; scp \/tmp\/notify.txt  kice@macos:\/tmp\/ &quot; &amp;<\/code><\/pre>\n<p>\u672c\u5730\u76d1\u63a7\u6587\u4ef6<\/p>\n<pre><code>\/opt\/homebrew\/bin\/bash \/Users\/kice\/bin\/macosnotify.sh\n<\/code><\/pre>\n<p>macosnotify.sh\u91cc\u9762\u7684\u5185\u5bb9<\/p>\n<pre><code>Mac|2024-01-30 11:17:58[kice@~]cat ~\/bin\/macosnotify.sh\n#\/opt\/homebrew\/bin\/bash\nif [[ -f &quot;\/tmp\/notify.txt&quot; ]]; then \/opt\/homebrew\/bin\/terminal-notifier -title &quot;Terminal&quot; -message &quot;`cat \/tmp\/notify.txt`&quot;; fi<\/code><\/pre>\n<h1><span class=\"ez-toc-section\" id=\"linux%E6%89%93%E5%8D%B0%E6%89%80%E6%9C%89%E7%BA%BF%E7%A8%8B%E7%9A%84%E5%90%8D%E7%A7%B0\"><\/span>\nlinux\u6253\u5370\u6240\u6709\u7ebf\u7a0b\u7684\u540d\u79f0<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<pre><code>ps H -o &#039;tid comm&#039;| grep  FollyLifoThread &gt; \/tmp\/folly.txt\n\u8fdb\u4e00\u6b65,\u627e\u5230 nonvoluntary_ctxt_switches\nfor I in `cat \/tmp\/folly.txt | awk  &#039;{print $1}&#039;`;  do  grep nonvoluntary_ctxt_switches \/proc\/$I\/status; done &gt; \/tmp\/nonvoluntary_ctxt_switches.txt\n\ncat \/tmp\/nonvoluntary_ctxt_switches.txt | awk &#039;{print $2}&#039; | paste -sd+ | bc -l<\/code><\/pre>\n<h1><span class=\"ez-toc-section\" id=\"rpm%E5%91%BD%E4%BB%A4\"><\/span>\nrpm\u547d\u4ee4<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/www.cyberciti.biz\/faq\/howto-list-installed-rpm-package\/\">https:\/\/www.cyberciti.biz\/faq\/howto-list-installed-rpm-package\/<\/a><\/p>\n<h1><span class=\"ez-toc-section\" id=\"docker\"><\/span>\ndocker<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>You will need to save the Docker image as a tar file:<\/p>\n<pre><code>docker save -o &lt;path for generated tar file&gt; &lt;image name&gt;<\/code><\/pre>\n<p>Then copy your image to a new system with regular file transfer tools such as cp, scp, or rsync (preferred for big files). After that you will have to load the image into Docker:<\/p>\n<pre><code>docker load -i &lt;path to image tar file&gt;<\/code><\/pre>\n<p>done<\/p>\n<h1><span class=\"ez-toc-section\" id=\"how_to_change_access_time_of_file\"><\/span>\nhow to change access time of file<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<pre><code>mount -o strictatime &lt;drive&gt; &lt;mount_point&gt;<\/code><\/pre>\n<h1><span class=\"ez-toc-section\" id=\"ffmpeg_merge_video\"><\/span>\nffmpeg merge video<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<pre><code>ffmpeg  -i video.webm -i audio.webm  -c copy Improve_your_Speaking_and_Conversational_skills_with_me_English_Speaking_Practice.mkv<\/code><\/pre>\n<h1><span class=\"ez-toc-section\" id=\"find%E6%8E%92%E9%99%A4%E6%96%87%E4%BB%B6\"><\/span>\nfind\u6392\u9664\u6587\u4ef6<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/4210042\/how-do-i-exclude-a-directory-when-using-find\">https:\/\/stackoverflow.com\/questions\/4210042\/how-do-i-exclude-a-directory-when-using-find<\/a><\/p>\n<p>Use the -prune primary. For example, if you want to exclude .\/misc:<\/p>\n<p>find . -path .\/misc -prune -o -name '*.txt' -print<br \/>\nTo exclude multiple directories, OR them between parentheses.<\/p>\n<p>find . -type d ( -path .\/dir1 -o -path .\/dir2 -o -path .\/dir3 ) -prune -o -name '*.txt' -print<br \/>\nAnd, to exclude directories with a specific name at any level, use the -name primary instead of -path.<\/p>\n<p>find . -type d -name node_modules -prune -o -name '*.json' -print<\/p>\n<h1><span class=\"ez-toc-section\" id=\"grep%E6%8E%92%E9%99%A4%E6%96%87%E4%BB%B6%E5%92%8C%E7%9B%AE%E5%BD%95%EF%BC%8C%E6%96%87%E4%BB%B6%E4%B8%8D%E5%9C%A8%E6%A0%B9%E7%9B%AE%E5%BD%95\"><\/span>\ngrep\u6392\u9664\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u6587\u4ef6\u4e0d\u5728\u6839\u76ee\u5f55<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<pre><code> find . \\( -path .\/.gitignore -o -path .\/.git -o -path .\/.sess9 -o -path .\/temp -o -path .\/_out -o -path .\/cscope.out -o -path .\/tags -o -path .\/dcsm\/sdk\/siorigin\/siml\/siml.h \\)  -prune -o -type f  -name &quot;*&quot; -exec grep -I -n nvmlErrorString {} \\+ &gt; temp\/grep.txt.fin<\/code><\/pre>\n<h1><span class=\"ez-toc-section\" id=\"ssh_new_host_key_check\"><\/span>ssh new host key check<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>ssh\u964c\u751f\u4e3b\u673a<br \/>\nssh -o StrictHostKeyChecking=no<\/p>\n","protected":false},"excerpt":{"rendered":"<p>rsync rsync\u6392\u9664\u4e00\u4e9b\u6587\u4ef6\u548c\u76ee\u5f55 exclude.txt: krp_gpu_uni_predict_s &#8230; <a title=\"linux\u547d\u4ee4\" class=\"read-more\" href=\"https:\/\/189505.xyz\/?p=348\" aria-label=\"More on linux\u547d\u4ee4\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/348"}],"collection":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=348"}],"version-history":[{"count":14,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/348\/revisions"}],"predecessor-version":[{"id":640,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/348\/revisions\/640"}],"wp:attachment":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}