ps コマンドをインストールするのに必要なパッケージは RPM だと
procps-ng
です
多くのコマンドはコマンド名のままなのに特殊過ぎます
覚えられません
そういうときはインストールするコマンドのパスを指定すればいいです
dnf install /usr/bin/ps
これで procps-ng がインストールできます
大抵のコマンドは /usr/bin にインストールされるので困ったときはやってみるといいです
dnf install /usr/bin/ps
{
....
"scripts": {
"c1": "command1"
},
....
}
#!/usr/bin/env node
console.log(123)
root@abc0c5fc3c92:/mnt/88# npm run c1
> 88@1.0.0 c1
> command1
123
{
....
"scripts": {
"c1": "ls"
},
....
}
root@abc0c5fc3c92:/mnt/88# npm run c1
> 88@1.0.0 c1
> ls
123
root@abc0c5fc3c92:/mnt/88# npm run c1
> 88@1.0.0 c1
> command
foo
bar
foo
foo
bar
bar
foo
foo
bar
sort file.txt | uniq
import sys
if len(sys.argv) < 2:
exit()
filename = sys.argv[1]
with open(filename) as file:
set = set()
while line := file.readline():
line = line.rstrip("\n")
if line not in set:
set.add(line)
print(line)
values = ["a", "b", "c"]
values_len = len(values)
for i in range(10 * 1000 * 1000):
value = values[i % values_len]
print(value)
[root@552d14e2dbe8 i]# python3 gen.py > data.txt
[root@552d14e2dbe8 i]# time python3 uniq.py data.txt
a
b
c
real 0m2.161s
user 0m2.160s
sys 0m0.000s
[root@552d14e2dbe8 i]# time ( sort data.txt | uniq )
a
b
c
real 0m1.242s
user 0m5.444s
sys 0m0.533s
values = ["aaa", "bbb", "ccc"]
values_len = len(values)
for i in range(50 * 1000 * 1000):
value = values[i % values_len]
print(value)
[root@198ac3e26189 opt]# time python3 uniq.py out.txt
aaa
bbb
ccc
real 0m12.368s
user 0m12.249s
sys 0m0.110s
[root@198ac3e26189 opt]# time ( sort out.txt | uniq )
aaa
bbb
ccc
real 0m8.984s
user 0m31.583s
sys 0m3.061s
[root@198ac3e26189 opt]# time ( sort out.txt | uniq )
aaa
bbb
ccc
real 0m30.542s
user 1m16.845s
sys 0m13.606s
[root@198ac3e26189 opt]# time ( sort out.txt | uniq )
aaa
bbb
ccc
real 0m21.338s
user 0m46.432s
sys 0m15.657s
[root@198ac3e26189 opt]# time ( sort out.txt | uniq )
aaa
bbb
ccc
real 0m12.536s
user 0m32.160s
sys 0m7.133s
[root@198ac3e26189 opt]# time ( sort out.txt | uniq )
aaa
bbb
ccc
real 0m9.317s
user 0m30.287s
sys 0m3.861s
[root@198ac3e26189 opt]# time ( sort out.txt | uniq )
aaa
bbb
ccc
real 0m8.795s
user 0m31.538s
sys 0m2.983s
PermitRootLogin prohibit-password
httpd -k stop
httpd -k restart
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
~> ls /usr/bin | grep ctl
bluetoothctl
bootctl
busctl
coredumpctl
evmctl
hostnamectl
journalctl
kdumpctl
keyctl
localectl
loginctl
networkctl
pg_ctl
portablectl
resolvectl
systemctl
teamdctl
timedatectl
udisksctl
wdctl
~> ls /usr/sbin | grep ctl
apachectl
auditctl
brctl
cupsctl
remotectl
smartctl
sysctl
usernetctl
zramctl
zcat file.gz | less
> elm repl
/home/user/n/lib/node_modules/elm/Elm-Platform/0.18.0/.cabal-sandbox/bin/elm-repl: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
sudo dnf install ncurses-compat-libs
parted
resizepart 2 100%
「2」 のところは parted 中に 「p」 で表示されるパーテーション IDpvresize /dev/sda2
lvresize -l +100%FREE /dev/fedora/root
xfs_growfs /
/dev/mapper/fedora-root や /dev/fedora/root だと 「is not a mounted XFS filesystem」 と言われるのでマウントしてる場所を指定/run/systemd/sessions
cd /run/systemd/sessions
ls * | xargs rm