{"id":8250,"date":"2021-05-20T10:58:12","date_gmt":"2021-05-20T02:58:12","guid":{"rendered":"https:\/\/blog.hoyo.idv.tw\/?p=8250"},"modified":"2023-05-22T23:46:22","modified_gmt":"2023-05-22T15:46:22","slug":"linux-sd-%e5%a3%bd%e5%91%bd%e5%af%ab%e5%85%a5%e6%8e%a7%e5%88%b6","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=8250","title":{"rendered":"Linux - SD \u58fd\u547d\u5beb\u5165\u63a7\u5236"},"content":{"rendered":"<p>--<\/p>\n<p>\u70ba\u4e86\u63a7\u5236 SD \u5361\u5beb\u5165\u6b21\u6578\u9650\u5236\u9054\u5230\u6700\u4f73\u4f7f\u7528\u58fd\u547d\uff0c\u6240\u4ee5 Hoyo \u5148\u5c07\u81ea\u5df1\u958b\u767c\u7684\u7a0b\u5f0f\u53e6\u5916\u4e00\u500b\u5206\u5272\u5340\uff0c\u518d\u628a\u539f\u7cfb\u7d71\u5206\u5272\u5340\u8a2d\u5b9a\u70ba\u552f\u8b80\uff0c\u53ea\u8981\u78ba\u5b9a\u7a0b\u5f0f\u5206\u5272\u5340\u6240\u6709\u7684\u5beb\u5165\u52d5\u4f5c\u7686\u5728\u9810\u60f3\u4e4b\u4e0b\uff0c\u5982\u6b64\u5c31\u53ef\u4ee5\u9054\u5230\u76ee\u7684\u3002<\/p>\n<p>--<\/p>\n<h2>\u5f97\u77e5\u6700\u8fd1\u6709\u88ab\u5beb\u5165\u7684\u6a94\u6848<\/h2>\n<ul>\n<li><a href=\"https:\/\/crmne0707.pixnet.net\/blog\/post\/321890618-linux-%e4%bf%ae%e6%94%b9%e6%aa%94%e6%a1%88%e6%99%82%e9%96%93\" target=\"_blank\" rel=\"noopener\">linux \u4fee\u6539\u6a94\u6848\u6642\u9593<\/a><\/li>\n<li><a href=\"https:\/\/blog.longwin.com.tw\/2017\/08\/linux-find-limit-date-time-file-2017\/\" target=\"_blank\" rel=\"noopener\">Linux \u4f7f\u7528 find \u627e\u51fa\u9650\u5b9a\u4fee\u6539\u6642\u9593\u5167\u7684\u6a94\u6848<\/a><\/li>\n<li><a id=\"cb_post_title_url\" class=\"postTitle2 vertical-middle\" href=\"https:\/\/www.cnblogs.com\/paul8339\/p\/8370529.html\" target=\"_blank\" rel=\"noopener\">find\u67e5\u627e\u65f6\u6392\u9664\u76ee\u5f55\u53ca\u6587\u4ef6<\/a><\/li>\n<\/ul>\n<p>\u4f7f\u7528\u524d\u8a18\u5f97\u6821\u6642<\/p>\n<pre class=\"lang:default decode:true\"># ntpdate tock.stdtime.gov.tw<\/pre>\n<p>\u627e\u51fa\u6700\u8fd1\u4e00\u500b\u5c0f\u6642\u5167\u6709\u88ab\u5beb\u5165\u7684\u6a94\u6848<\/p>\n<pre class=\"lang:default decode:true\"># find \/ ! -path '\/proc\/*' -mmin -60 -type f<\/pre>\n<pre class=\"lang:default decode:true\">\/run\/log\/journal\/babb6c5f23fe45fc86696504cbbc02d1\/system.journal\r\n\/run\/log\/journal\/babb6c5f23fe45fc86696504cbbc02d1\/system@78ea610d7c7f43a08aa207a7516a2447-0000000000020253-0005c2402715397b.journal\r\n\/run\/log\/journal\/babb6c5f23fe45fc86696504cbbc02d1\/system@78ea610d7c7f43a08aa207a7516a2447-000000000001fe35-0005c24008e25ccc.journal\r\n\/sys\/fs\/cgroup\/systemd\/system.slice\/run-user-1001.mount\/cgroup.clone_children\r\n\/sys\/fs\/cgroup\/systemd\/system.slice\/run-user-1001.mount\/tasks\r\n\/sys\/fs\/cgroup\/systemd\/system.slice\/run-user-1001.mount\/notify_on_release\r\n\/sys\/fs\/cgroup\/systemd\/system.slice\/run-user-1001.mount\/cgroup.procs\r\n\/var\/cache\/apt\/pkgcache.bin\r\n\/var\/cache\/motd-news\r\n\/var\/lib\/apt\/daily_lock\r\n\/var\/lib\/systemd\/timers\/stamp-apt-daily.timer\r\n\/var\/lib\/systemd\/timers\/stamp-motd-news.timer\r\n\/var\/lib\/systemd\/timers\/stamp-apt-daily-upgrade.timer<\/pre>\n<ul>\n<li>-mtime \u6a94\u6848\u6709\u4fee\u6539\uff0c\u55ae\u4f4d\uff1a\u5929<\/li>\n<li>-mmin \u6a94\u6848\u6709\u4fee\u6539\uff0c\u55ae\u4f4d\uff1a\u5206\u9418<\/li>\n<\/ul>\n<p>\u4fee\u6b63\u5f8c<\/p>\n<ul>\n<li><a href=\"https:\/\/www.cyberciti.biz\/faq\/bash-find-exclude-all-permission-denied-messages\/\" target=\"_blank\" rel=\"noopener\">Linux \/ Unix Find Command Avoid Permission Denied Messages<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \"># find \/ ! -path '\/proc\/*' ! -path '\/run\/*' ! -path '\/sys\/*' -mmin -60 -type f 2&gt;\/dev\/null<\/pre>\n<p>\u52a0\u4e0a 2&gt;\/dev\/null \u5c07\u6c92\u6709\u6b0a\u9650\u7684\u8a0a\u606f\u96b1\u85cf<\/p>\n<p>--<\/p>\n<h2>\u8a18\u61b6\u9ad4\u6a94\u6848<\/h2>\n<ul>\n<li><a class=\"question-hyperlink\" href=\"https:\/\/unix.stackexchange.com\/questions\/188886\/what-is-in-dev-proc-and-sys\" target=\"_blank\" rel=\"noopener\">What is in \/dev, \/proc and \/sys?<\/a><\/li>\n<\/ul>\n<p>\u70ba\u4ec0\u9ebc\u8981\u6392\u9664 \/proc \/run \/sys \uff1f \u9996\u5148\u53ef\u4ee5\u770b\u4e00\u4e0b df \u8cc7\u8a0a<\/p>\n<pre class=\"lang:default decode:true\"># df -h\r\nFilesystem      Size  Used Avail Use% Mounted on\r\nudev            210M     0  210M   0% \/dev\r\ntmpfs            50M  5.9M   44M  12% \/run\r\n\/dev\/mmcblk0p2  2.1G  1.8G  280M  87% \/\r\ntmpfs           246M     0  246M   0% \/dev\/shm\r\ntmpfs           5.0M  4.0K  5.0M   1% \/run\/lock\r\ntmpfs           246M     0  246M   0% \/sys\/fs\/cgroup\r\n\/dev\/mmcblk0p1   40M   12M   29M  30% \/boot\r\n\/dev\/mmcblk0p3  477M   71M  377M  16% \/opt\/Gateway\r\ntmpfs            50M     0   50M   0% \/run\/user\/1000\r\ntmpfs            50M     0   50M   0% \/run\/user\/1001<\/pre>\n<p>\u53ef\u4ee5\u77e5\u9053\u7cfb\u7d71\u9810\u8a2d\u639b\u8f09\u4e86\u5f88\u591a tmpfs \u4e5f\u5c31\u662f\u4f7f\u7528\u8a18\u61b6\u9ad4\u7684\u8def\u5f91\uff0c\u9664\u4e86\u8a18\u61b6\u9ad4\u4e4b\u5916\u4e5f\u6709\u5f88\u591a\u865b\u64ec\u7684\u6a94\u6848\u8cc7\u8a0a\uff0c\u4f8b\u5982 \/proc \/sys \uff0c\u9019\u4e9b\u8def\u5f91\u7576\u7136\u4e5f\u662f\u8981\u6392\u9664<\/p>\n<p>--<\/p>\n<h2>\u8cc7\u6599\u5eab<\/h2>\n<p>\u539f\u5148\u4f7f\u7528 SQLite\uff0c\u4f7f\u7528\u524d\u5148\u5c07\u6a94\u6848\u8907\u88fd\u5230\u8a18\u61b6\u9ad4\u518d\u5f9e\u8a18\u61b6\u9ad4\u5b58\u53d6\uff0c\u7576\u9700\u8981\u7570\u52d5\u8cc7\u6599\u6642\u518d\u5f9e\u8a18\u61b6\u9ad4\u8907\u88fd\u5230 SD \u5361\uff0c\u9019\u6a23\u5f9e\u908f\u8f2f\u4e5f\u662f\u63a7\u5236\u4e86\u5beb\u5165\uff0c\u4e0d\u904e\u5f8c\u4f86\u9047\u5230\u983b\u7e41\u9047\u5230\u8cc7\u6599\u5eab\u6bc0\u640d\u4ee5\u53ca\u6700\u56b4\u91cd\u7684 database disk image is malformed \u554f\u984c\uff0c\u5c31\u6539\u6210\u4f7f\u7528 JSON \u7576\u4f5c\u8cc7\u6599\u7684\u5132\u5b58\u8f09\u9ad4\uff0c\u7576\u7136\u9700\u8981\u72a7\u7272\u4e00\u4e9b\u7cfb\u7d71\u529f\u80fd\uff0c\u4e0d\u904e\u5728\u9019\u7a2e\u61c9\u7528\u7a69\u5b9a\u4ee5\u53ca\u5c07\u554f\u984c\u53ef\u63a7\u5236\u624d\u662f\u6700\u91cd\u8981\u7684<\/p>\n<p>(\u5f8c\u4f86\u627e\u5230\u4e86\u00a0<a href=\"https:\/\/pypi.org\/project\/tinydb\/\" target=\"_blank\" rel=\"noopener\">TinyDB<\/a>\u00a0\u9019\u7a2e\u597d\u50cf\u4e5f\u662f\u4f7f\u7528 JSON \u70ba\u8f09\u9ad4\u7684\u8cc7\u6599\u5132\u5b58\u65b9\u5f0f)<\/p>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"8250\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,671&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>-- \u70ba\u4e86\u63a7\u5236 SD \u5361\u5beb\u5165\u6b21...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"8250\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,671&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/8250"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8250"}],"version-history":[{"count":12,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/8250\/revisions"}],"predecessor-version":[{"id":12222,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/8250\/revisions\/12222"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}