trash-cliのインストール
sudo dnf install trash-cli
ファイルをゴミ箱に移動する
trash-put ファイル名
ゴミ箱の中身を確認する
trash-list
ゴミ箱を空にする
trash-empty
trash-cliのインストール
sudo dnf install trash-cli
ファイルをゴミ箱に移動する
trash-put ファイル名
ゴミ箱の中身を確認する
trash-list
ゴミ箱を空にする
trash-empty
#!/bin/bash # 読み込むファイルを指定 filename="example.txt" # ファイルの中身を1行ずつ読み込んで処理 while IFS= read -r line; do # 各行に対する処理をここで行う echo "Processing: $line" done < "$filename"
IFS= を空文字に設定して、「区切り文字を完全に無効化」する。Bashのreadコマンドは標準的に改行を「行単位の区切り」として扱うので、IFS を空文字にしても、改行で行ごとに区切られる。
コード内で IFS= と設定すると、IFS の値を一時的に空文字に変更します。この設定は、そのスコープ内でのみ適用され、他の部分には影響しません。たとえば、IFS= read -r line の行でのみ有効です。その後、IFS の値は元に戻ります。
なので、グローバルに IFS が変更されることはありませんが、特定のコマンド実行時に一時的に影響を与える仕組みになっています。
タイトル、アーティスト、アルバム名、ジャンルなどの情報を含めることが可能です。
ffmpeg -i input.mp4 -metadata title="タイトル名" -metadata artist="アーティスト名" -metadata comment="コメント" -codec copy output.mp4
個別のデータだけを取得する
mediainfo --Output="General;%Title%" input.mp4
このコマンドはタイトルだけを表示します。また、他のメタデータ(たとえばアーティストや作成日時)を取得したい場合は、%Artist%や%File_Created_Date%などの変数を使って指定可能です。
RPM Fusionリポジトリが必要
パッケージ名の確認
$ sudo dnf search ardour Matched fields: name ardour6.x86_64: Digital Audio Workstation ardour7.x86_64: Digital Audio Workstation ardour8.x86_64: Digital Audio Workstation
$ sudo dnf install ardour8
Fedora 42 users can install gnome-shell-extension-appindicator which is already ready for Gnome 48
$ sudo dnf install gnome-shell-extension-appindicator Package Arch Version Repository Size Installing: gnome-shell-extension-appindicator noarch 59-2.fc41 fedora 246.0 KiB Installing dependencies: libappindicator-gtk3 x86_64 12.10.1-5.fc41 fedora 108.6 KiB libdbusmenu x86_64 16.04.0-28.fc41 fedora 540.3 KiB libdbusmenu-gtk3 x86_64 16.04.0-28.fc41 fedora 88.5 KiB Transaction Summary: Installing: 4 packages $ sudo dnf install libappindicator-gtk3
VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).
VirtualBox は VMX ルート モードで動作できません。KVM カーネル拡張を無効にし、カーネルを再コンパイルして再起動してください (VERR_VMX_IN_VMX_ROOT_MODE)。
# dnf install dnf5-plugin-automatic Updating and loading repositories: Repositories loaded. Failed to resolve the transaction: Problem: conflicting requests - package dnf5-plugin-automatic-5.2.6.2-1.fc41.x86_64 from fedora requires libcurl-full(x86-64), but none of the providers can be installed - package dnf5-plugin-automatic-5.2.7.0-1.fc41.x86_64 from updates requires libcurl-full(x86-64), but none of the providers can be installed - problem with installed package - installed package libcurl-minimal-8.9.1-2.fc41.x86_64 conflicts with libcurl(x86-64) provided by libcurl-8.9.1-2.fc41.x86_64 from fedora - package libcurl-minimal-8.9.1-2.fc41.x86_64 from fedora conflicts with libcurl(x86-64) provided by libcurl-8.9.1-2.fc41.x86_64 from fedora You can try to add to command line: --allowerasing to allow erasing of installed packages to resolve problems --skip-broken to skip uninstallable packages
インストール中に依存関係の問題が発生した場合、特にlibcurlに関連する競合が報告されています。その場合は、次のコマンドで競合するパッケージを交換できます:
# dnf swap libcurl-minimal libcurl
インストール後、設定ファイルを作成します:
# cp /usr/share/dnf5/dnf5-plugins/automatic.conf /etc/dnf/dnf5-plugins/automatic.conf
設定ファイルを編集して自動アップデートを設定します。例えば:
# vi /etc/dnf/dnf5-plugins/automatic.conf
[commands] # Whether updates should be applied when they are available, by # dnf5 automatic. apply_updates = yes
dnf5-automatic.service の ExecStart に --installupdates を追加。
# vi /usr/lib/systemd/system/dnf5-automatic.service
ExecStart=/usr/bin/dnf5 automatic --timer --installupdates
最後に、自動アップデート機能を有効化します:
# systemctl enable --now dnf5-automatic.timer
マジ?
相互依存性:
apply_updatesがyesでも、タイマーが無効なら自動更新は実行されません。
タイマーが有効でも、apply_updatesがnoなら更新は適用されません。
自動インストールを行うためには、download_updates = yes の設定に加えて、dnf-automatic-install.timer を有効にする必要があります。これにより、ダウンロードされた更新パッケージが自動的にインストールされます。
いいえ、両方をインストールする必要はありません。**「audacity-freeworld」と「audacity」**は同じソフトウェアですが、異なる機能を持っています。
「audacity」: 標準バージョンで、特定のライセンスや特許に関連する機能(例えば、MP3のインポート/エクスポート)が含まれていない場合があります。
「audacity-freeworld」: 追加のライブラリ(LameやFFmpegなど)をサポートしており、MP3や他のファイル形式のインポート/エクスポートが可能です。
したがって、MP3ファイルの編集や他の追加機能が必要な場合は、「audacity-freeworld」をインストールすることをお勧めします。どちらか一方を選んでインストールすれば十分です。
$ sudo dnf install audacity-freeworld
grep コマンドで複数のパターンを検索する際には、-E オプションを使用するか、| をエスケープ(\|)する必要があります。-E オプションを使用すると、grep は拡張正規表現をサポートします。これにより、| をエスケープせずに複数のパターンを検索できます。
sshd -T | grep -i -E 'SyslogFacility|PermitRootLogin|PermitEmptyPasswords|PasswordAuthentication'
「|」の前後のスペースを入れない。
スペースを入れると意図したマッチングが変わる可能性があります。例えば、次のように記述すると:
regexp1 | regexp2
この場合、正規表現は「regexp1」と「regexp2」にスペースがあることを期待します。したがって、スペースを入れると、マッチする条件が変わるため、注意が必要です。