<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>コマンド | ファイルサーバーの研究</title>
	<atom:link href="https://fujisan.sunnyday.jp/fs/category/useful-commands/feed/" rel="self" type="application/rss+xml" />
	<link>https://fujisan.sunnyday.jp/fs</link>
	<description>Linux+Netatalk+Samba+NFS+macOS+Windows</description>
	<lastBuildDate>Fri, 17 May 2024 09:24:28 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://fujisan.sunnyday.jp/fs/wp-content/uploads/2021/08/cropped-6f8a3b8fbb84b6b21d7536fbe58efe55-32x32.jpg</url>
	<title>コマンド | ファイルサーバーの研究</title>
	<link>https://fujisan.sunnyday.jp/fs</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>rm -v ：削除の詳細を表示する</title>
		<link>https://fujisan.sunnyday.jp/fs/rm-v-%ef%bc%9a%e5%89%8a%e9%99%a4%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b/</link>
					<comments>https://fujisan.sunnyday.jp/fs/rm-v-%ef%bc%9a%e5%89%8a%e9%99%a4%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Fri, 17 May 2024 09:23:32 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1735</guid>

					<description><![CDATA[https://linux.command-ref.com/command-rm.html rm [オプション] ＜ファイル名 or ディレクトリ名＞ 【オプション】オプション 説明-f 削除時に確認表示を行わない-i  [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a rel="noopener" href="https://linux.command-ref.com/command-rm.html" target="_blank">https://linux.command-ref.com/command-rm.html</a></p>



<p><strong>rm [オプション] ＜ファイル名 or ディレクトリ名＞</strong></p>



<p><br>【オプション】<br>オプション 説明<br>-f 削除時に確認表示を行わない<br>-i 削除前に確認メッセージを表示する<br>（表示例）rm: remove regular empty file ‘aa.txt’?<br>-I 削除対象が4つ以上存在する場合のみ確認メッセージを表示する<br>（表示例）rm: remove 4 arguments?<br>-r ディレクトリ内のファイルをまるごと削除する<br><strong>-v 削除の詳細を表示する</strong><br>（表示例）removed ‘test.txt’</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/rm-v-%ef%bc%9a%e5%89%8a%e9%99%a4%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux にゴミ箱を用意し、rm コマンドでゴミ箱に移動するようにする</title>
		<link>https://fujisan.sunnyday.jp/fs/linux-%e3%81%ab%e3%82%b4%e3%83%9f%e7%ae%b1%e3%82%92%e7%94%a8%e6%84%8f%e3%81%97%e3%80%81rm-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7%e3%82%b4%e3%83%9f%e7%ae%b1%e3%81%ab%e7%a7%bb%e5%8b%95%e3%81%99/</link>
					<comments>https://fujisan.sunnyday.jp/fs/linux-%e3%81%ab%e3%82%b4%e3%83%9f%e7%ae%b1%e3%82%92%e7%94%a8%e6%84%8f%e3%81%97%e3%80%81rm-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7%e3%82%b4%e3%83%9f%e7%ae%b1%e3%81%ab%e7%a7%bb%e5%8b%95%e3%81%99/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Fri, 17 May 2024 03:07:06 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1733</guid>

					<description><![CDATA[https://qiita.com/Erytheia/items/828634e5dd1d33055ffb]]></description>
										<content:encoded><![CDATA[
<p></p>



<p><a rel="noopener" href="https://qiita.com/Erytheia/items/828634e5dd1d33055ffb" target="_blank">https://qiita.com/Erytheia/items/828634e5dd1d33055ffb</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/linux-%e3%81%ab%e3%82%b4%e3%83%9f%e7%ae%b1%e3%82%92%e7%94%a8%e6%84%8f%e3%81%97%e3%80%81rm-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7%e3%82%b4%e3%83%9f%e7%ae%b1%e3%81%ab%e7%a7%bb%e5%8b%95%e3%81%99/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>rmでファイル削除後にdf -hで容量が減らない時の対処(Linux)</title>
		<link>https://fujisan.sunnyday.jp/fs/rm%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%89%8a%e9%99%a4%e5%be%8c%e3%81%abdf-h%e3%81%a7%e5%ae%b9%e9%87%8f%e3%81%8c%e6%b8%9b%e3%82%89%e3%81%aa%e3%81%84%e6%99%82%e3%81%ae%e5%af%be%e5%87%a6lin/</link>
					<comments>https://fujisan.sunnyday.jp/fs/rm%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%89%8a%e9%99%a4%e5%be%8c%e3%81%abdf-h%e3%81%a7%e5%ae%b9%e9%87%8f%e3%81%8c%e6%b8%9b%e3%82%89%e3%81%aa%e3%81%84%e6%99%82%e3%81%ae%e5%af%be%e5%87%a6lin/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Fri, 17 May 2024 03:00:07 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1731</guid>

					<description><![CDATA[https://easyramble.com/df-h-after-rm.html]]></description>
										<content:encoded><![CDATA[
<p><a rel="noopener" href="https://easyramble.com/df-h-after-rm.html" target="_blank">https://easyramble.com/df-h-after-rm.html</a></p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/rm%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%89%8a%e9%99%a4%e5%be%8c%e3%81%abdf-h%e3%81%a7%e5%ae%b9%e9%87%8f%e3%81%8c%e6%b8%9b%e3%82%89%e3%81%aa%e3%81%84%e6%99%82%e3%81%ae%e5%af%be%e5%87%a6lin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ディレクトリ内のファイルを早く削除したい！【async-delete】</title>
		<link>https://fujisan.sunnyday.jp/fs/%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%86%85%e3%81%ae%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e6%97%a9%e3%81%8f%e5%89%8a%e9%99%a4%e3%81%97%e3%81%9f%e3%81%84%ef%bc%81%e3%80%90as/</link>
					<comments>https://fujisan.sunnyday.jp/fs/%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%86%85%e3%81%ae%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e6%97%a9%e3%81%8f%e5%89%8a%e9%99%a4%e3%81%97%e3%81%9f%e3%81%84%ef%bc%81%e3%80%90as/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Fri, 17 May 2024 02:55:04 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1729</guid>

					<description><![CDATA[https://qiita.com/s_yosh1d/items/d37b544f887c4f56c7b8]]></description>
										<content:encoded><![CDATA[
<p></p>



<p><a rel="noopener" href="https://qiita.com/s_yosh1d/items/d37b544f887c4f56c7b8" target="_blank">https://qiita.com/s_yosh1d/items/d37b544f887c4f56c7b8</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%86%85%e3%81%ae%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e6%97%a9%e3%81%8f%e5%89%8a%e9%99%a4%e3%81%97%e3%81%9f%e3%81%84%ef%bc%81%e3%80%90as/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Red Hat Customer Portalより。「10.4. システムのシャットダウン、サスペンド、および休止状態」</title>
		<link>https://fujisan.sunnyday.jp/fs/red-hat-customer-portal%e3%82%88%e3%82%8a%e3%80%82%e3%80%8c10-4-%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e3%80%81%e3%82%b5%e3%82%b9/</link>
					<comments>https://fujisan.sunnyday.jp/fs/red-hat-customer-portal%e3%82%88%e3%82%8a%e3%80%82%e3%80%8c10-4-%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e3%80%81%e3%82%b5%e3%82%b9/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Thu, 22 Feb 2024 06:12:49 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1715</guid>

					<description><![CDATA[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/system_administrators_guide/sect [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p></p>



<p><a rel="noopener" href="https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-power" target="_blank">https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-power</a></p>



<p>10.4. システムのシャットダウン、サスペンド、および休止状態<br>Red Hat Enterprise Linux 7 では、systemctl ユーティリティーが、これまでのバージョンの Red Hat Enterprise Linux システムで使用されていた多くの電源管理コマンドに置き換わっています。表10.8「電源管理コマンドと systemctl の比較」 に表示されているコマンドは、互換性の理由から現在も利用することができますが、可能な場合は systemctl の使用が推奨されます。</p>



<p>表10.8 電源管理コマンドと systemctl の比較</p>



<p>古いコマンド 新しいコマンド 詳細<br>halt</p>



<p>systemctl halt</p>



<p>システムを停止します。</p>



<p>poweroff</p>



<p>systemctl poweroff</p>



<p>システムの電源を切ります。</p>



<p>reboot</p>



<p>systemctl reboot</p>



<p>システムを再起動します。</p>



<p>pm-suspend</p>



<p>systemctl suspend</p>



<p>システムをサスペンドします。</p>



<p>pm-hibernate</p>



<p>systemctl hibernate</p>



<p>システムを休止状態にします。</p>



<p>pm-suspend-hybrid</p>



<p>systemctl hybrid-sleep</p>



<p>システムを休止状態にしてサスペンドします。</p>



<p>10.4.1. システムのシャットダウン<br>systemctl ユーティリティーは、システムをシャットダウンするコマンドを提供します。ただし、従来の shutdown コマンドもサポートされます。shutdown コマンドは、systemctl ユーティリティーを呼び出してシャットダウンを実行しますが、time 引数もサポートするという利点があります。これは、計画メンテナンスにとりわけ役立ち、システムシャットダウンの予定に関する警告にユーザーが対応する時間をより長く確保できます。シャットダウンをキャンセルするオプションがあることも利点です。</p>



<p>systemctl コマンドの使用<br>システムをシャットダウンし、マシンの電源を切るには、root で次のコマンドを実行します。</p>



<p>systemctl poweroff<br>マシンの電源を切らずにシステムをシャットダウンして停止するには、root で以下のコマンドを実行します。</p>



<p>systemctl halt<br>デフォルトでは、このコマンドのいずれかを実行すると、systemd が、システムに現在ログインしたすべてのユーザーに情報メッセージを送信します。systemd がメッセージを送信しないようにするには、たとえば、コマンドラインオプション &#8211;no-wall を付けてコマンドを実行します。</p>



<p>systemctl &#8211;no-wall poweroff<br>shutdown コマンドの使用<br>指定した時間にシステムをシャットダウンしてマシンの電源を切るには、root で、以下の形式でコマンドを実行します。</p>



<p>shutdown &#8211;poweroff hh:mm<br>hh:mm は 24 時間形式の時刻となります。新たなログインを防ぐために、システムをシャットダウンする 5 分前に /run/nologin ファイルが作成されます。時間引数を使用する場合は、コマンドに任意のメッセージ wall message を付けることができます。</p>



<p>マシンの電源を切らずに、少し待ってシステムをシャットダウンして停止するには、root で以下の形式のコマンドを実行します。</p>



<p>shutdown &#8211;halt +m<br>+m は遅らせる時間 (分) です。キーワード now は、+0 のエイリアスとなります。</p>



<p>保留中のシャットダウンは、root で以下のコマンドを実行するとキャンセルできます。</p>



<p>shutdown -c<br>詳細なコマンドオプションは、shutdown(8) man ページを参照してください。</p>



<p>10.4.2. システムの再起動<br>システムを再起動するには、root で以下のコマンドを実行します。</p>



<p>systemctl reboot<br>デフォルトでは、このコマンドにより、systemd が、システムに現在ログインしたすべてのユーザーに情報メッセージを送信します。systemd がこのメッセージを送信しないようにするには、コマンドラインオプション &#8211;no-wall を付けてこのコマンドを実行します。</p>



<p>systemctl &#8211;no-wall reboot<br>10.4.3. システムのサスペンド<br>システムをサスペンドするには、root で次のコマンドを実行します。</p>



<p>systemctl suspend<br>このコマンドは、システムの状態を RAM に保存し、マシンにある、RAM モジュール以外のほとんどのデバイスの電源を切ります。マシンの電源を戻すと、システムは再起動せずに RAM からその状態を復元します。システムの状態がハードディスクではなく RAM に保存されるので、システムのサスペンドモードから復元する場合は、休止状態からの復元と比べて著しく速くなります。ただし、システムをサスペンドした状態は、停電に対して脆弱となります。</p>



<p>システムを休止状態にする方法は、「システムの休止状態」 を参照してください。</p>



<p>10.4.4. システムの休止状態<br>システムを休止状態にするには、root で次のコマンドを実行します。</p>



<p>systemctl hibernate<br>このコマンドは、システムの状態をハードディスクドライブに保存し、マシンの電源を切ります。マシンの電源を戻すと、システムは再起動せずに、保存されたデータからその状態を復元します。システムの状態が RAM ではなくハードディスクに保存されるため、マシンが RAM モジュールに電力を維持する必要がありません。ただし、システムの休止状態から復元する場合は、サスペンドモードからの復元と比べて大幅に遅くなります。</p>



<p>システムを休止状態にしてサスペンドするには、root で次のコマンドを実行します。</p>



<p>systemctl hybrid-sleep<br>システムをサスペンドする方法は、「システムのサスペンド」 を参照してください。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/red-hat-customer-portal%e3%82%88%e3%82%8a%e3%80%82%e3%80%8c10-4-%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e3%80%81%e3%82%b5%e3%82%b9/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【参考】Linuxの停止・再起動の方法</title>
		<link>https://fujisan.sunnyday.jp/fs/%e3%80%90%e5%8f%82%e8%80%83%e3%80%91linux%e3%81%ae%e5%81%9c%e6%ad%a2%e3%83%bb%e5%86%8d%e8%b5%b7%e5%8b%95%e3%81%ae%e6%96%b9%e6%b3%95/</link>
					<comments>https://fujisan.sunnyday.jp/fs/%e3%80%90%e5%8f%82%e8%80%83%e3%80%91linux%e3%81%ae%e5%81%9c%e6%ad%a2%e3%83%bb%e5%86%8d%e8%b5%b7%e5%8b%95%e3%81%ae%e6%96%b9%e6%b3%95/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Thu, 22 Feb 2024 06:10:00 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1713</guid>

					<description><![CDATA[2020年6月23日2022年6月12日 https://log.dot-co.co.jp/run-shutdown/ パワーオフとリブート 目次シャットダウンと再起動を行うコマンドsystemd以前のinitプロセスで [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>2020年6月23日2022年6月12日</p>



<p><a rel="noopener" href="https://log.dot-co.co.jp/run-shutdown/" target="_blank">https://log.dot-co.co.jp/run-shutdown/</a></p>



<p>パワーオフとリブート</p>



<p>目次<br>シャットダウンと再起動を行うコマンド<br>systemd以前のinitプロセスで使われていたコマンド<br>シャットダウンと再起動を行うコマンド<br>LinuxでSystemctlを使った電源オフは「(systemctl) poweroff」システム停止のみ(電源は切らない)「(systemctl) halt」再起動は「(systemctl) reboot」、スリープは「systemctl suspend」休止状態は「systemctl hibernate」を利用します。</p>



<p>Linuxの起動・停止のコマンドは複数ありますが、現在も昔のコマンドが使える状態だからです。</p>



<p>linuxで使われるシャットダウンコマンドの一覧です。</p>



<p>shutdown -h</p>



<p>・systemd<br>systemctl halt (halt)<br>systemctl poweroff (poweroff : init 0)<br>現在の(systemdを使っている)ディストリビューションの多くはsystemctlコマンドを使って電源管理を行います。</p>



<p>shutdownやhaltなどのコマンドのパスを調べてみると全てsystemctlにリンクされていることが分かります。</p>



<p>シャットダウンコマンドの行先<br>シャットダウンコマンドはsystemctlに送られる</p>



<p>systemd以前のinitプロセスで使われていたコマンド<br>init<br>halt, poweroff<br>systemd<br>systemctl halt, systemctl poweroff<br>unix<br>shutdown<br>haltやpoweroffはSysV init(systemd以前の主流であるinitプロセス)で使用されていたコマンドです。</p>



<p>systemdではsystemctl halt、systemctl poweroffを使いますが、haltやpoweroffもそのまま使えます(リンクが貼ってある)</p>



<p>shutdownコマンドはunixで使用されているコマンドですが、Linuxでも使用できます。<br>shutdownの使用が推奨されている場合がありますが、shutdownコマンドでもpoweroffでも動作は同じようです。むしろshutdownコマンドは「shutdown -h now」のように長いコマンドを打つ分面倒なのでpoweroffを使えばよいです。<br>haltコマンドではPCの電源は落ちません。実行プロセスを全停止後、PC全体の電源は切らずにCPUの電源のみ切ります。haltは即時システムを停止するときに使います。</p>



<p>shutdownコマンドのオプション</p>



<p>shutdownコマンドのオプションでshutdown -h というのはよく見ますが、実はshutdown、shutdown -h、shutdown -Pは全て同じ動作になります。manでshutdownを見るとshutdownはオプションを指定しない場合shutdown -P (マシンの電源を切る)をデフォルトで指定すると書いてあります。またshutdown -hも同じくshutdown -Pと同じになります。そのため、電源を切るだけならshutdownだけでよいということですね。shutdownだけでは電源オフは1分後に行われるのですぐに停止したい場合は+0またはnowを使いましょう。</p>



<p>Linuxの再起動<br>shutdown -r<br>systemctl reboot (reboot:init 6)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/%e3%80%90%e5%8f%82%e8%80%83%e3%80%91linux%e3%81%ae%e5%81%9c%e6%ad%a2%e3%83%bb%e5%86%8d%e8%b5%b7%e5%8b%95%e3%81%ae%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MacからUbuntuデスクトップにSSHで接続する</title>
		<link>https://fujisan.sunnyday.jp/fs/mac%e3%81%8b%e3%82%89ubuntu%e3%83%87%e3%82%b9%e3%82%af%e3%83%88%e3%83%83%e3%83%97%e3%81%abssh%e3%81%a7%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b/</link>
					<comments>https://fujisan.sunnyday.jp/fs/mac%e3%81%8b%e3%82%89ubuntu%e3%83%87%e3%82%b9%e3%82%af%e3%83%88%e3%83%83%e3%83%97%e3%81%abssh%e3%81%a7%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Sat, 17 Feb 2024 10:12:14 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<category><![CDATA[手順]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1704</guid>

					<description><![CDATA[https://zenn.dev/smzst/scraps/2e3b6d22faf237]]></description>
										<content:encoded><![CDATA[
<p><a rel="noopener" href="https://zenn.dev/smzst/scraps/2e3b6d22faf237" target="_blank">https://zenn.dev/smzst/scraps/2e3b6d22faf237</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/mac%e3%81%8b%e3%82%89ubuntu%e3%83%87%e3%82%b9%e3%82%af%e3%83%88%e3%83%83%e3%83%97%e3%81%abssh%e3%81%a7%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is “.Trash-1000” Folder and How to Delete It?</title>
		<link>https://fujisan.sunnyday.jp/fs/what-is-trash-1000-folder-and-how-to-delete-it/</link>
					<comments>https://fujisan.sunnyday.jp/fs/what-is-trash-1000-folder-and-how-to-delete-it/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Mon, 15 Jan 2024 08:34:37 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[手順]]></category>
		<category><![CDATA[課題ログ]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1648</guid>

					<description><![CDATA[https://devicetests.com/what-is-trash-1000-folder-and-how-to-delete-it 目次 Locating the “.Trash-1000” FolderDel [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a rel="noopener" href="https://devicetests.com/what-is-trash-1000-folder-and-how-to-delete-it" target="_blank">https://devicetests.com/what-is-trash-1000-folder-and-how-to-delete-it</a></p>




  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-16" checked><label class="toc-title" for="toc-checkbox-16">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">Locating the “.Trash-1000” Folder</a></li><li><a href="#toc2" tabindex="0">Deleting the “.Trash-1000” Folder</a></li></ol>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">Locating the “.Trash-1000” Folder</span></h2>



<p>The&nbsp;<code>.Trash-1000</code>&nbsp;folder is usually located in the root directory of each mounted filesystem. It is a hidden folder, meaning it starts with a&nbsp;<code>.</code>&nbsp;and is not visible by default. To see it, you need to enable the viewing of hidden files in your file manager or use the&nbsp;<code>-a</code>&nbsp;flag with the&nbsp;<code>ls</code>&nbsp;command in the terminal, like so:</p>



<pre class="wp-block-code"><code>ls -a /path/to/folder</code></pre>



<h2 class="wp-block-heading"><span id="toc2">Deleting the “.Trash-1000” Folder</span></h2>



<p>Before proceeding with the deletion, it’s important to understand that deleting the&nbsp;<code>.Trash-1000</code>&nbsp;folder may affect the “move to trash” function of your file manager. Therefore, it’s recommended to empty the folder instead of deleting it completely.</p>



<p>To delete the contents of the&nbsp;<code>.Trash-1000</code>&nbsp;folder, open the terminal and type the following command:</p>



<pre class="wp-block-code"><code>sudo rm -rf /path/to/folder/.Trash-1000/*</code></pre>



<p>In this command,&nbsp;<code>sudo</code>&nbsp;gives you root privileges,&nbsp;<code>rm</code>&nbsp;is the remove command,&nbsp;<code>-rf</code>&nbsp;is a combination of flags where&nbsp;<code>-r</code>&nbsp;or&nbsp;<code>-R</code>&nbsp;stands for recursive (to remove directories and their contents recursively), and&nbsp;<code>-f</code>&nbsp;stands for force (to ignore nonexistent files and arguments, and never prompt).&nbsp;<code>/path/to/folder/.Trash-1000/*</code>&nbsp;is the path to the&nbsp;<code>.Trash-1000</code>&nbsp;folder.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/what-is-trash-1000-folder-and-how-to-delete-it/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>umountコマンドでdevice is busyと表示されるときの対処法</title>
		<link>https://fujisan.sunnyday.jp/fs/umount%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7device-is-busy%e3%81%a8%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%82%8b%e3%81%a8%e3%81%8d%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95/</link>
					<comments>https://fujisan.sunnyday.jp/fs/umount%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7device-is-busy%e3%81%a8%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%82%8b%e3%81%a8%e3%81%8d%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Wed, 18 Jan 2023 00:55:47 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1606</guid>

					<description><![CDATA[umountコマンドでdevice is busyと表示されるときの対処法 https://pcknowhow.seesaa.net/article/481606013.html Linuxでマウントディレクトリを解除す [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>umountコマンドでdevice is busyと表示されるときの対処法</p>
<p><a rel="noopener" href="https://pcknowhow.seesaa.net/article/481606013.html" target="_blank">https://pcknowhow.seesaa.net/article/481606013.html</a></p>
<p>Linuxでマウントディレクトリを解除するために<br />
「umount マウントしてるサーバ:パス」<br />
（例：umount 192.168.10.5:/linux-mount）<br />
とunmount コマンドをすると「umount: /マウントパス: device is busy」<br />
等と表示されてアンマウントできないことがあった。</p>
<p>通常ならばそのマウントディレクトリ内でファイルが編集だとか<br />
余分なプロセスを実行しているとか等でアンマウントできないことが考えられる。</p>
<p>なので</p>
<p><strong>fuser -muv /マウントパス</strong></p>
<p><strong>とやってそのディレクトリを使っている余分なプロセスを探し出して</strong><br />
<strong>killコマンドなどで停止させて再度unmountを行う。</strong></p>
<p>だけど！<br />
時々何のプロセスも実行していないのにdevice is busyとか言ってくることがある。</p>
<p>しばらく時間をおいてから再度umountを叩いてもダメ。。</p>
<p>そんなときはしょうがないので<br />
<strong>「umount -l マウントしてるサーバ:パス」</strong><br />
（例：umount -l 192.168.10.5:/linux-mount）</p>
<p>とするとアンマウントできる、ことがある。。</p>
<p>-l （lazy）オプションはどうやら最終手段のようです。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/umount%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7device-is-busy%e3%81%a8%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%82%8b%e3%81%a8%e3%81%8d%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【Linux】アンマウント時のdevice is busyへの対処法</title>
		<link>https://fujisan.sunnyday.jp/fs/%e3%80%90linux%e3%80%91%e3%82%a2%e3%83%b3%e3%83%9e%e3%82%a6%e3%83%b3%e3%83%88%e6%99%82%e3%81%aedevice-is-busy%e3%81%b8%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95/</link>
					<comments>https://fujisan.sunnyday.jp/fs/%e3%80%90linux%e3%80%91%e3%82%a2%e3%83%b3%e3%83%9e%e3%82%a6%e3%83%b3%e3%83%88%e6%99%82%e3%81%aedevice-is-busy%e3%81%b8%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95/#respond</comments>
		
		<dc:creator><![CDATA[fs]]></dc:creator>
		<pubDate>Wed, 18 Jan 2023 00:37:33 +0000</pubDate>
				<category><![CDATA[コマンド]]></category>
		<category><![CDATA[参考リンク]]></category>
		<guid isPermaLink="false">https://fujisan.sunnyday.jp/fs/?p=1604</guid>

					<description><![CDATA[【Linux】アンマウント時のdevice is busyへの対処法 https://e-penguiner.com/unmount-even-device-is-busy/ 2022/12/23 目次 device i [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>【Linux】アンマウント時のdevice is busyへの対処法</p>
<p><a rel="noopener" href="https://e-penguiner.com/unmount-even-device-is-busy/" target="_blank">https://e-penguiner.com/unmount-even-device-is-busy/</a></p>
<p>2022/12/23</p>
<p>目次<br />
device is busyでもアンマウントする方法<br />
対象デバイスを対象としたプロセスを確認<br />
アンマウント<br />
device is busyでもアンマウントする方法<br />
アンマウントするため，umountコマンドを使用した際に，下記のように”device is busy”となることが多々あります．</p>
<p>umount /mnt<br />
umount.nfs4: /mnt: device is busy<br />
Shell<br />
対象のデバイスに対してなにかしらのプロセスが動いていることが原因です．ほとんどの場合，誰かがアクセスしています．</p>
<p>対象デバイスを対象としたプロセスを確認<br />
fuser -muv /path/to/mount_point<br />
Shell<br />
lsof /path/to/mount_point<br />
Shell<br />
デバイスを利用中のプロセスを削除</p>
<p>fuser -k /path/to/mount_point<br />
Shell<br />
上記コマンドでプロセスが停止されないこともあります．</p>
<p>その場合下記コマンドでユーザのプロセスごと停止します．</p>
<p>pkill -9 -u username<br />
Shell<br />
アンマウント<br />
デバイスへのプロセスが停止していることを確認出来たら下記コマンドでアンマウントします．</p>
<p>umount /path/to/mount<br />
Shell<br />
それでもアンマウントできない場合，-lオプションを追加すると大抵うまくいきます．</p>
<p>umount -l /path/to/mount</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fujisan.sunnyday.jp/fs/%e3%80%90linux%e3%80%91%e3%82%a2%e3%83%b3%e3%83%9e%e3%82%a6%e3%83%b3%e3%83%88%e6%99%82%e3%81%aedevice-is-busy%e3%81%b8%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
