最新記事

Linuxカーネル保護メモリと予約メモリの違いは何ですか? (メモリマッピングパラメータ)
linux
memory
kernel-parameters

Linuxカーネル保護メモリと予約メモリの違いは何ですか? (メモリマッピングパラメータ)

Linuxカーネルはmemmapパラメータ*)を使用して、さまざまなユースケースに合わせてメモリ領域を手動で指定します。 Q:違いは何ですか?予約済み記憶(memmap=nn[KMG]$ss[KMG])と保護されるメモリ(memmap=nn[KMG]!ss[KMG])? つまり、カーネルはこれをどのように処理し、いつ使用されますか? に関しては、予約されたメモリが保護されたメモリとしてリストされていると/proc/iomem思います。そうですか?ReservedRAM buffer *) テキストでいっぱいではなく、リンク可能な良い参照ページが見つからなかったため、リンクを添付しました。カーネル文書: memmap=exactmap [KNL,X86] Enable setting of an exact E820 memory map, as specified by the user. Such memmap=exactmap lines can be constructed based on BIOS output or other requirements. See the memmap=nn@ss option description. memmap=nn[KMG]@ss[KMG] [KNL] Force usage of a specific region of memory. Region of memory to be used is from ss to ss+nn. If @ss[KMG] is omitted, it is equivalent to mem=nn[KMG], which limits max address to nn[KMG]. Multiple different regions can be specified, comma delimited. Example: memmap=100M@2G,100M#3G,1G!1024G memmap=nn[KMG]#ss[KMG] [KNL,ACPI] Mark specific memory as ACPI data. Region of memory to be marked is from ss to ss+nn. memmap=nn[KMG]$ss[KMG] [KNL,ACPI] Mark specific memory as reserved. Region of memory to be reserved is from ss to ss+nn. Example: Exclude memory from 0x18690000-0x1869ffff memmap=64K$0x18690000 or memmap=0x10000$0x18690000 Some bootloaders may need an escape character before '$', like Grub2, otherwise '$' and the following number will be eaten. memmap=nn[KMG]!ss[KMG] [KNL,X86] Mark specific memory as protected. Region of memory to be used, from ss to ss+nn. The memory region may be marked as e820 type 12 (0xc) and is NVDIMM or ADR memory. memmap=%-+ [KNL,ACPI] Convert memory within the specified region from to . If "-" is left out, the whole region will be marked as , even if previously unavailable. If "+" is left out, matching memory will be removed. Types are specified as e820 types, e.g., 1 = RAM, 2 = reserved, 3 = ACPI, 12 = PRAM.

Admin

sedファイルを試してください
linux

sedファイルを試してください

現在のファイルは次のとおりです。 Computer1 Computer2 Computer3 [...] 次に変更したいと思います。 Echo computer1;ssh computer1 date Echo computer2;ssh computer2 date [...] あなたの助けと謝罪に心から感謝します。エココンピュータ1、ネットタイム-Sコンピュータ1などのように見せたいです。

Admin

.desktop ファイルで URL 文字列を引用符で囲んで渡す方法
linux
command-line
arguments
.desktop
xdg-open

.desktop ファイルで URL 文字列を引用符で囲んで渡す方法

Wine経由でWhatsApp Desktopをインストールし、whatsapp://リンクを接続してみました。 電話番号でチャットを開始するには、コマンドラインから次のコマンドを実行します+1234567890。 env WINEPREFIX="/home/mike/WhatsAppDesktopWine" wine C:\\users\\mike\\AppData\\Roaming\\Microsoft\\Windows\\Start\ Menu\\Programs\\WhatsApp\\WhatsApp.lnk "whatsapp://send/?phone=%2B1234567890&text&type=phone_number&app_absent=0" 私のファイルを編集し、~.config/mimeapps.list以下を追加しました。 x-scheme-handler/whatsapp=~/.local/share/applications/wine/Programs/WhatsApp/WhatsApp.desktop WhatsApp.desktopには次の行が含まれています。 Exec=env WINEPREFIX="/home/mike/WhatsAppDesktopWine" wine C:\\\\users\\\\mike\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\Programs\\\\WhatsApp\\\\WhatsApp.lnk 次に、 "%u"最後に追加することで、行全体が次のようになります。 Exec=env WINEPREFIX="/home/mike/WhatsAppDesktopWine" wine C:\\\\users\\\\mike\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\Programs\\\\WhatsApp\\\\WhatsApp.lnk "%u" ただし、コマンドにURLを渡しません。

Admin

Parrot OS 5.0でadd-apt-repositoryを実行するとPythonエラーが発生する
linux
apt
python
parrotsec

Parrot OS 5.0でadd-apt-repositoryを実行するとPythonエラーが発生する

昨日、新しいParrot OS 5.0をインストールしましたが、新しいリポジトリを追加しようとするとPythonエラーが発生します。どのリポジトリを追加しようとしても、同じエラーが引き続き表示されます。私が実行したときの出力は次のとおりですsudo add-apt-repository ppa:grumbel/ppa。 Traceback (most recent call last): File "/usr/bin/apt-add-repository", line 95, in sp = SoftwareProperties(options=options) File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 103, in __init__ self.sourceslist = SourcesList() File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 276, in __init__ self.refresh() File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 292, in refresh self.matcher.match(source) File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 484, in match if (re.search(template.match_uri, source.uri) and File "/usr/lib/python3.9/re.py", line 201, in search return _compile(pattern, flags).search(string) File "/usr/lib/python3.9/re.py", line 304, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.9/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.9/sre_parse.py", line 948, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.9/sre_parse.py", line 834, in _parse p = _parse_sub(source, state, sub_verbose, nested + 1) File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.9/sre_parse.py", line 834, in _parse p = _parse_sub(source, state, sub_verbose, nested + 1) File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.9/sre_parse.py", line 668, in _parse raise source.error("nothing to repeat", re.error: nothing to repeat at position 2 sources.list.dフォルダが存在し、ファイルと共に存在することを確認しましたparrot.list。私のPythonのバージョンはPython 3.9.2次のとおりですparrot.list。 ## This file provides the default APT repositories for Parrot Security ## These repositories are used to fetch new software and system updates ############################### ## Default Parrot Repository ## ############################### ## The 'parrot' repository provides all the Parrot software considered ## stable and tested. ## ## the main suite provides the base system plus all the software released ## under a free and open source license compatible with the Debian guidelines. ## ## the contrib suite provides additional free software that depends on third ## party software not provided by the main suite. it usually means that such ## packages depend on non-free software. ## ## the non-free suite provides additional packages that don't comply with ## the Debian Free Software Guidelines. They are mostly proprietary software. deb https://deb.parrot.sh/parrot parrot main contrib non-free ###################### ## Security Updates ## ###################### ## The 'parrot-security' repository provides time sensitive security updates ## that have to be delivered to end users as fast as possible ## ## this repo should always be enabled in your system ## ## we strongly recommend to NOT use mirrors for this repo, but only ## access security updates from our official domains or CDNs. ## ## a mirror server could take too much time to fetch an important update, ## leaving you without security updates for a timespan outside of our control deb https://deb.parrot.sh/direct/parrot parrot-security main contrib non-free ############### ## Backports ## ############### ## The stable repository contains software that is considered stable the day of ## the release. such packages receive only security and stability updates that ## don't introduce new features and don't drop old ones. ## ## the 'backports' repository provides feature updates to many packages, and ## even external software that was originally excluded from the stable release. ## ## disable it if you prefer stability and reliability over bleeding edge features deb https://deb.parrot.sh/parrot parrot-backports main contrib non-free ####################### ## Updates / Testing ## ####################### ## The 'parrot-updates' repository provides updates before they are made available ## to 'parrot'. this repo is mostly meant to be used by developers and beta testers ## to extensively test updates before they are migrated to the main repository ## ## we suggest not to enable it, as it may introduce untested bugs and make the ## system unstable. updates are delivered as fast as possible (within a week) ## so you are not missing anything important with this disabled (unless you are a dev) #deb https://deb.parrot.sh/parrot parrot-updates main contrib non-free ############################## ## Source Code Repositories ## ############################## ## These repositories provide the debian source artifacts of the packages ## in the corresponding repos in the form of dsc files and the corresponding ## tarballs ## ## you only need these repositories if you intend to download the source code ## of a package and re-compile it yourself with debian-compliant build tools #deb-src https://deb.parrot.sh/parrot parrot main contrib non-free #deb-src https://deb.parrot.sh/parrot parrot-security main contrib non-free #deb-src https://deb.parrot.sh/parrot parrot-backports main contrib non-free #deb-src https://deb.parrot.sh/parrot parrot-updates main contrib non-free ########################################################## ## How to configure mirror servers for faster downloads ## ########################################################## ## The Parrot system is configured by default to use the central ## parrot archive directors. The Parrot directors are special servers that ## collect all the requests of the users and redirect them to the nearest ## download server available for the user who made the request. ## ## The Parrot Mirror Network is secured by centralized digital signatures ## and the mirrors can't inject fake updates. If an evil mirror tries to inject ## a fake package, Parrot OS will automatically refuse to download and install it. ## ## To configure a mirror, you have to replace the original URL with the URL ## Provided by the mirror ## ## Example: ## If you live in Italy and you want to take advantage of the GARR mirror, ## Replace ## deb https://deb.parrot.sh/parrot parrot main contrib non-free ## With ## deb https://parrot.mirror.garr.it/mirrors/parrot parrot main contrib non-free ## ## IMPORTANT NOTES: ## do NOT use mirrors for the parrot-security repository. use them ## exclusively for 'parrot', 'parrot-backports' and 'parrot-updates' ## ## LIST: ## A full and updated list of official mirrors is available here: ## https://www.parrotsec.org/docs/mirrors-list.html ## ## ########################## ## Some popular mirrors ## ########################## ## This is a non-comprehensive, and not-updated list of mirrors ## that we leave here a a quick reference. some of them are ## worldwide, meaning that they have several nodes around the world ## and the fastest one is picked automatically (CDN). ## others are tight to a specific region of the world. ## Worldwide - Parrot - automatically redirects to the fastest of all the mirrors #deb https://deb.parrot.sh/parrot/ parrot main contrib non-free ## Worldwide - Parrot - core servers with no redirection #deb https://deb.parrot.sh/direct/parrot/ parrot main contrib non-free ## Wordlwide - Azure - Uses the Azure CDN platform #deb https://edge1.parrot.run/parrot/ parrot main contrib non-free ## Wordlwide - Aliyun - Uses the AlibabaCloud mirrors behind their worldwide CDN #deb deb https://mirrors.aliyun.com/parrot parrot main contrib non-free ## US Massachussetts - SIPB MIT University #deb http://mirrors.mit.edu/parrot/ parrot main contrib non-free ## US California - OCF Berkekey University #deb https://mirrors.ocf.berkeley.edu/parrot/ parrot main contrib non-free ## US Virginia - Leaseweb #deb https://mirror.wdc1.us.leaseweb.net/parrot parrot main contrib non-free ## Germany - Halifax RWTH-Aachen University #deb https://ftp.halifax.rwth-aachen.de/parrotsec/ parrot main contrib non-free ## Italy - GARR Consortium #deb https://parrot.mirror.garr.it/mirrors/parrot/ parrot main contrib non-free ## Netherlands - Nluug #deb https://ftp.nluug.nl/os/Linux/distr/parrot/ parrot main contrib non-free ## Russia - Yandex #deb https://mirror.yandex.ru/mirrors/parrot/ parrot main contrib non-free ## Brazil - Sao Paulo University #deb http://sft.if.usp.br/parrot/ parrot main contrib non-free ## Singapore - 0x #deb https://mirror.0x.sg/parrot/ parrot main contrib non-free ## China - USTC University #deb http://mirrors.ustc.edu.cn/parrot parrot main contrib non-free ## We strongly invite you to visit https://www.parrotsec.org/docs/mirrors-list.html ## to find the mirror that better fits your needs

Admin

シェルスクリプト終了コード
linux
shell-script
exit-status

シェルスクリプト終了コード

bash 終了コードについて質問があります。基本的に私が返す各コードの意味を定義できますか?それでは、これを定義または文書化する標準的な方法はありますか? 私はそれを調べたところ、「共通」終了コードのさまざまなリストがあることがわかりました。例えば https://www.cyberciti.biz/faq/linux-bash-exit-status-set-exit-statusin-bash/ また、いくつかのGNU文書を見てみると、少し混乱していることがわかりました。 シャットダウン状態は 0 ~ 255 ですが、シェルは以下のように具体的に 125 より高い値を使用できます。 どのような標準的な慣行があるのだろうか。

Admin

ファイルの最後の行に各テキストファイルの名前を追加します。
linux
ubuntu
text

ファイルの最後の行に各テキストファイルの名前を追加します。

閉鎖。質問は〜です。無関係。現時点では回答は許可されていません。 この問題は複数のウェブサイトに公開。クロスポストはお勧めできません。サポートセンターそしてコミュニティFAQより多くの情報を知りたいです。 閉鎖2年前。 この問題を改善する firstFile.txt、...、tenthFile.txtという10個のファイルがあります。 ファイルの最後の行にファイル名を追加したいと思います。 つまり、最初の行の場合、最後の行は "firstFile"になります。 コード一行でこれを行いたいです。

Admin

私が試したこと
linux
bash
shell-script
command-line
kerberos

私が試したこと

私はプロジェクトで開発者を交換し、彼らのコードを理解しようとしています。 $ ktutil ktutil: addent -password -p $userName@$domainName -k 1 -e rc4-hmac Password for <$userName>@<$domainName>: このコマンドは、次に表示できる項目を生成します。 $ ktutil ktutil: l slot KVNO Principal ---- ---- ------------------------------------------ 1 1 <$userName>@<$domainName> 私が試したこと $ man ktutilこれは次のことを示します。 $ ktutil ktutil: addent -h usage: addent (-key | -password) -p principal -k kvno -e enctype ktutil: addent ? usage: addent (-key | -password) -p principal -k kvno -e enctype 私はこれを見つけました:ktutil - 最新ドキュメント:

Admin

ls は再帰的にフルパスを表示します。
linux
bash
ls
tree

ls は再帰的にフルパスを表示します。

Linuxで同じことをする方法は明らかにいくつかありますが、最近はfor i in xxxツリー内の各項目のリストを再帰的に参照する必要がありました。をtree実行して(またはディレクトリ名のみを取得する)tree -fail解決策を見つけましたtree -faildが、次の質問がありました。ls? $ tree -fail . ./.custom ./custom_loader.sh ./.git ./.git/branches ./.git/COMMIT_EDITMSG ./.git/config ./.git/description ./.git/HEAD ./.git/hooks ./.git/hooks/applypatch-msg.sample

Admin

OSがオンラインのときにWoLを目覚めさせる方法
linux
wake-on-lan

OSがオンラインのときにWoLを目覚めさせる方法

オンボードNICのWoL出力が接続され、ブートではなくシステムリセット(私の意見ではNMI経由)が発生する独自のハードウェアがあります。 これは、PDUやIPMIの交換コストを発生させることなくリモート再起動を容易にするために行われたようです。 しかし、OSがロードされるとWoL機能が抑制されるようです。 memtest 86はこれを抑制しませんが、Linuxは抑制することがわかりました。頑張ったethtool -s wol a/u/m/b/a/g/s 私は正しい道を行っていますか? OSの実行中にWoLを目覚めたままにする方法は? / # lspci -nn | grep -i net 01:00.0 Ethernet controller [0200]: Intel Corporation 82574L Gigabit Network Connection [8086:10d3] / # ethtool -i ethtool -i eth0 driver: e1000e version: 2.3.2-k firmware-version: 2.1-0 bus-info: 0000:01:00.0 / # uname -a Linux (none) 3.19.0 #1 SMP Mon Oct 19 15:48:25 CDT 2015 x86_64 GNU/Linux / # ターゲットカーネルは、最新のCentOS、Ubuntu、Debian、Windows、Proxmox(Debian)、およびVMwareです。 私はWoLをオペレーティングシステム「外部」で実行したいと思います。必要に応じて、OSがこれを無効にできることに同意しますが、デフォルトではそうではありません。 WoLが単にBIOSでアクティブになり、ハードウェアでサポートされている場合、OSは何をしても一貫して動作します。

Admin

ファイルの解凍の問題 - パラメータのリストが長すぎます。
linux
linux-mint
zip
gunzip

ファイルの解凍の問題 - パラメータのリストが長すぎます。

この質問にはすでに答えがあります。: 多くのファイルを含むフォルダをgunzipに圧縮する (6回答) 閉鎖3年前。 各フォルダにファイルを含む複数のフォルダ階層を持つフォルダ(フォルダAなど)のすべてのファイルを圧縮する必要があります。このフォルダAは、ディレクトリ内の何千ものフォルダに存在します。すべてのフォルダ内のすべてのファイルを圧縮する必要があります。次のコマンドを試しています。 gunzip -r path/to/Folder/*/Folder_A/ 次のエラーが発生しますArgument list to long。 コマンドを使用してファイルを圧縮するのに役立ちます。

Admin

メモリが大きいデバイスでは、スワップを永久に削除しても安全ですか?
linux
debian
partition
swap
lsblk

メモリが大きいデバイスでは、スワップを永久に削除しても安全ですか?

128Gメモリを搭載したデスクトップコンピュータがあります。計算集約的なスクリプトを実行しない場合の一般的なメモリ使用量は次のとおりです。 sam@debian:~$ free -ht --si total used free shared buff/cache available Mem: 128G 3.3G 93G 101M 31G 124G Swap: 975M 0B 975M Total: 129G 3.3G 94G シミュレーションを実行しても、メモリ使用量は75%を超えません。だからswap最初から1Gパーティションが必要かどうか疑問に思いました。インストールしたときにDebian組み込みUse entire disk and set up encrypted LVMオプションを使用しましたが、自動でしたswap。安全に取り外してdebian--vg-rootスペースを取るにはどうすればよいですか?以下は私のパーティションレイアウトです。 sam@debian:~$ lsblk -a NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 0B 0 loop loop1 7:1 0 0B 0 loop loop2 7:2 0 0B 0 loop loop3 7:3 0 0B 0 loop loop4 7:4 0 0B 0 loop loop5 7:5 0 0B 0 loop loop6 7:6 0 0B 0 loop loop7 7:7 0 0B 0 loop nvme0n1 259:0 0 931.5G 0 disk ├─nvme0n1p1 259:1 0 512M 0 part /boot/efi ├─nvme0n1p2 259:2 0 488M 0 part /boot └─nvme0n1p3 259:3 0 930.5G 0 part └─nvme0n1p3_crypt 254:0 0 930.5G 0 crypt ├─debian--vg-root 254:1 0 929.5G 0 lvm / └─debian--vg-swap_1 254:2 0 976M 0 lvm [SWAP]

Admin