{"id":32100,"date":"2022-03-09T21:00:47","date_gmt":"2022-03-09T20:00:47","guid":{"rendered":"https:\/\/www.linuxboxen.dk\/?p=32100"},"modified":"2022-03-09T21:00:47","modified_gmt":"2022-03-09T20:00:47","slug":"disk-oversigt-i-bash","status":"publish","type":"post","link":"https:\/\/www.linuxboxen.dk\/?p=32100","title":{"rendered":"Disk oversigt i bash med df."},"content":{"rendered":"<p>Du kender det. Navnet snap. en <strong>df<\/strong> giver alt for meget output om nogle dirs som hedder noget med<\/p>\n<p><code>user@work01:~$ df -h<br \/>\nFilesystem Size Used Avail Use% Mounted on<br \/>\nudev 7,8G 0 7,8G 0% \/dev<br \/>\ntmpfs 1,6G 3,5M 1,6G 1% \/run<br \/>\n\/dev\/sdc1 469G 206G 239G 47% \/<br \/>\ntmpfs 7,8G 76M 7,7G 1% \/dev\/shm<br \/>\ntmpfs 5,0M 4,0K 5,0M 1% \/run\/lock<br \/>\ntmpfs 7,8G 0 7,8G 0% \/sys\/fs\/cgroup<br \/>\n\/dev\/loop1 48M 48M 0 100% \/snap\/cecconoid\/7<br \/>\n\/dev\/loop2 457M 457M 0 100% \/snap\/wine-platform\/125<br \/>\n\/dev\/loop3 256K 256K 0 100% \/snap\/jq\/6<br \/>\n\/dev\/loop5 141M 141M 0 100% \/snap\/gnome-3-26-1604\/102<br \/>\n\/dev\/loop4 163M 163M 0 100% \/snap\/gnome-3-28-1804\/145<br \/>\n\/dev\/loop6 640K 640K 0 100% \/snap\/indicator-sensors\/291<br \/>\n\/dev\/loop7 640K 640K 0 100% \/snap\/indicator-sensors\/261<br \/>\n\/dev\/loop0 58M 58M 0 100% \/snap\/winds\/95<br \/>\n\/dev\/loop8 640K 640K 0 100% \/snap\/gnome-logs\/103<br \/>\n\/dev\/loop9 187M 187M 0 100% \/snap\/arduino\/56<br \/>\n\/dev\/loop19 248M 248M 0 100% \/snap\/gnome-3-38-2004\/87<br \/>\n\/dev\/loop20 141M 141M 0 100% \/snap\/gnome-3-26-1604\/104<br \/>\n\/dev\/loop21 219M 219M 0 100% \/snap\/gnome-3-34-1804\/72<br \/>\n\/dev\/loop22 123M 123M 0 100% \/snap\/openscad\/192<br \/>\n\/dev\/loop23 132M 132M 0 100% \/snap\/cmake\/1005<br \/>\n\/dev\/loop26 100M 100M 0 100% \/snap\/librepcb\/621<br \/>\n\/dev\/loop25 213M 213M 0 100% \/snap\/code\/89<br \/>\n...<br \/>\n...<br \/>\nOsv osv.<br \/>\n<\/code><\/p>\n<p>l\u00f8sningen giver n\u00e6sten sig selv, her er grep din ven.<\/p>\n<p><code>$ df -h | grep -v \"snap\"<br \/>\nFilesystem      Size  Used Avail Use% Mounted on<br \/>\nudev            7,8G     0  7,8G   0% \/dev<br \/>\ntmpfs           1,6G  3,5M  1,6G   1% \/run<br \/>\n\/dev\/sdc1       469G  206G  239G  47% \/<br \/>\ntmpfs           7,8G   69M  7,8G   1% \/dev\/shm<br \/>\ntmpfs           5,0M  4,0K  5,0M   1% \/run\/lock<br \/>\ntmpfs           7,8G     0  7,8G   0% \/sys\/fs\/cgroup<br \/>\ndatadisk        1,8T  585G  1,2T  33% \/datadisk<br \/>\ntmpfs           1,6G   16K  1,6G   1% \/run\/user\/121<br \/>\ntmpfs           1,6G  112K  1,6G   1% \/run\/user\/1000<br \/>\n<\/code><\/p>\n<p>S\u00e5 inverter du din grep -v betyder in<strong>v<\/strong>ert. S\u00e5 du kan jo lige s\u00e5 godt fjerne alt du ikke vil se. Jeg bruger selv denne linje i mit alias.<\/p>\n<p><code>$ df -h | grep -v 'snap' | grep -v 'tmpfs'<\/code><\/p>\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_32100\" class=\"pvc_stats all  \" data-element-id=\"32100\" 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> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.linuxboxen.dk\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Du kender det. Navnet snap. en df giver alt for meget output om nogle dirs som hedder noget med user@work01:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 7,8G 0 7,8G 0% \/dev tmpfs 1,6G 3,5M 1,6G 1% \/run \/dev\/sdc1 469G 206G 239G 47% \/ tmpfs 7,8G 76M 7,7G 1% \/dev\/shm tmpfs 5,0M [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_32100\" class=\"pvc_stats all  \" data-element-id=\"32100\" 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> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.linuxboxen.dk\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/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":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-32100","post","type-post","status-publish","format-standard","hentry","category-tips"],"a3_pvc":{"activated":true,"total_views":13,"today_views":0},"_links":{"self":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/32100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32100"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/32100\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}