Git: как узнать размер remoted репозитория?
Хочу клонировать лепрозиторий, но есть подозрение что места на диске не хватит.
Есть ли в git опция, которая покажет необходимый размер?
Хочу клонировать лепрозиторий, но есть подозрение что места на диске не хватит.
Есть ли в git опция, которая покажет необходимый размер?
Какой ты линуксоид, если не соберёшь себе это сам
Вендузятник ты, иди отсюда
Давным давно на CD диске была игра про Марс. Подскажите пожалуйста если кто помнит такую.
Схема сети:
Роутер
192.168.0.1 ------ 192.168.0.2
|
|
|
wlp1s0
192.168.0.4 enp2s0 ------ 192.168.0.10
В роутере:
# ip route add 192.168.0.10 via 192.168.0.4
# ip route
default via 100.XXX.XXX.X dev pppoe-wan
100.XXX.XXX.X dev pppoe-wan scope link src 100.YYY.YYY.YYY
192.168.0.0/24 dev br-lan scope link src 192.168.0.1
192.168.0.10 via 192.168.0.4 dev br-lan
На 192.168.0.4:
# ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.0.4/32 scope global noprefixroute enp2s0
valid_lft forever preferred_lft forever
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 192.168.0.4/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
valid_lft 35309sec preferred_lft 35309sec
# ip route
default via 192.168.0.1 dev wlp1s0 proto dhcp src 192.168.0.4 metric 600
192.168.0.0/24 dev wlp1s0 proto kernel scope link src 192.168.0.4 metric 600
192.168.0.10 dev enp2s0 proto static scope link metric 700
# echo 1 > /proc/sys/net/ipv4/ip_forward
Но достучаться до 192.168.0.10 не могу ни с роутера, ни с 192.168.0.2 разумеется.
Чего не хватает?
Решение: Помогите с сетью пж (комментарий)
Хорошо было бы хранить некоторые настройки отображения на клиенте в cookies-ах, особенно «Старый вид трекера и форума»,
ибо дюже заколебало его переключать каждый раз, когда меняю смартфон на ПК или обратно.
Наверняка это просто сделать тем кто умеет.
Также предлагаю доработать новую тему трекера согласно рисунку https://ibb.co/4FTfH6F
Попытался было оформить ОСАГО на vsk.ru, ввожу значит необходимые данные, всё хорошо, жму оплатить и vsk.ru перекидывает на pay.alfabank.ru (картина маслом https://ibb.co/n0G2B2H), а у меня не alfabank же, а другой банк вообще.
Я правильно понял что вводить номер своей карты категорически нельзя и это попытка обмана?
Что-то сломало звуковую подсистему.
Пытаюсь менять громкость, но она меняется обратно и регулятор в трее дергается с частотой 1Гц
Снял на видео https://disk.yandex.ru/i/GsqRh2cOE4wnWg
Куда смотреть? /Pulseaudio и pipewire не предлагать./
Подскажите команду в линуксах или простое решение без лишних зависимостей, перлов и пистонов.
#!/bin/bash
dir1=/tmp/000/111/1/1/1
dir2=/tmp/000/111/1/1/2
dir3=/tmp/000/112/1/1/1
mkdir -p "$dir1"
mkdir -p "$dir2"
mkdir -p "$dir3"
cmd=???
result=$($cmd "$dir1" "$dir2" "$dir3")
echo $result # надо получить /tmp/000/
cmndir(){
local eop=$(($#+1))
local result=''
local tmps=''
for (( i = 0; i < ${#1}; ++i)); do
local a=${1:$i:1}
for (( n = 2; n < ${eop}; ++n)); do
local x="x=\${$n:$i:1}"
eval $x
[ "x$a" == "x$x" ] || { echo $result; return 0; }
done
tmps=$tmps$a
[ "x$a" == "x/" ] && result=$tmps
done
echo $result
}
Оформил недавно PR https://github.com/void-linux/void-packages/pull/42755
В процессе проверок были выявлены проблемы. Решил их и опять сделал коммиты. После чего контрибьютер abenson написал: «Please squash these into a single commit.»
Безуспешно попытавшись обьединить коммиты в 1, я решил закрыть PR и сделать новый, т.к. с git я только со вчера.
$ git clone git@github.com:onlylunix/void-packages.git
$ git remote add upstream https://github.com/void-linux/void-packages.git
$ git pull
$ git checkout master -b firebird3upd3.0.10-1
$ git add srcpkgs/firebird3/files/firebird-fix-perm-fdb
$ git add srcpkgs/firebird3/files/firebird.xinetd
# git add ...
$ commit -m "firebird3: update to 3.0.10"
$ git push --set-upstream origin firebird3upd3.0.10-1
$ git add srcpkgs/firebird3/files/firebird-fix-perm-fdb
$ git commit -m "Ololo"
$ git push --set-upstream origin firebird3upd3.0.10-1
In the future, please make the changes by amending and squashing the existing commits and then force pushing to the same branch.»
Как продавить PR для voidlinux? Надо ли приглашать ментейнера пакета и как это делать и где его найти? Где-то читал, что надо приглашать мейнтейнера привязанного к пакету, но немогу сейчас найти где.
PR -> https://github.com/void-linux/void-packages/pull/42755
Upd.: нужна помощь зрительного зала Pull request voidlinux на github (комментарий)
PR -> https://github.com/void-linux/void-packages/pull/42789
VoidLinux, systemd отсутствует совсем.
Звук у пользователя есть, но нет у root-а, а надо.
Pipewire и pipewire-pulse запускаются пользователем.
Доступ настроил как в теме Доступ к pipewire-pulse из разных юзеров? , спасибо dimgel.
Выхлопы команд:
# alsamixer
cannot open mixer: Узел выключен
# mpg123 alarm.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.30.2; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
[src/libout123/modules/alsa.c:open_alsa():181] error: cannot open device default
[src/libout123/libout123.c:check_output_module():984] error: Module 'alsa' device open failed.
[src/libout123/libout123.c:out123_open():482] error: Found no driver out of [alsa] working with device <default>.
main: [src/mpg123.c:check_fatal_output():333] error: out123 error 3: failure loading driver module
# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pipewire
PipeWire Sound Server
default
Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=PCH
HDA Intel PCH, ALC887-VD Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, X2483/2481
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
hdmi:CARD=PCH,DEV=2
HDA Intel PCH, HDMI 2
HDMI Audio Output
Недавно заметил, что как минимум 2 ядра CPU не сбрасывают частоту на ядрах версии 5.19, хотя нагрузки нет.
На ядре 5.18 такого бага нет.
Скриншот из виртуальной консоли https://ibb.co/dgvWSF9
Кто-нибудь ещё столкнулся с таким?
Заметил интересную особенность - если немного нагрузить процессор, то частота ядер на минимуме https://ibb.co/fCq6B62
Убираем нагрузку - наблюдаем максимальную частоту в трее и htop https://ibb.co/C9ZwKJz
Звук пожожий на вжик-вжик:
$ dmesg
...
[Пт авг 26 16:08:39 2022] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[Пт авг 26 16:08:39 2022] ata1.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
[Пт авг 26 16:08:39 2022] ata1.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
[Пт авг 26 16:08:39 2022] ata1.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
[Пт авг 26 16:08:39 2022] ata1.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
[Пт авг 26 16:08:39 2022] ata1.00: configured for UDMA/133
[Пт авг 26 16:10:30 2022] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[Пт авг 26 16:10:30 2022] ata1.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
[Пт авг 26 16:10:30 2022] ata1.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
[Пт авг 26 16:10:30 2022] ata1.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
[Пт авг 26 16:10:30 2022] ata1.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
[Пт авг 26 16:10:30 2022] ata1.00: configured for UDMA/133
$ uname -r
5.19.4-sky1
# smartctl -a /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.19.4-sky1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.12
Device Model: ST3500418AS
Serial Number: 9VMT11W5
LU WWN Device Id: 5 000c50 02d1c5c7d
Firmware Version: CC46
User Capacity: 500 107 862 016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: 7200 rpm
Device is: In smartctl database 7.3/5319
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Fri Aug 26 16:28:06 2022 MSK
==> WARNING: A firmware update for this drive may be available,
see the following Seagate web pages:
http://knowledge.seagate.com/articles/en_US/FAQ/207931en
http://knowledge.seagate.com/articles/en_US/FAQ/213891en
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 600) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 81) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 112 099 006 Pre-fail Always - 49175639
3 Spin_Up_Time 0x0003 098 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 089 089 020 Old_age Always - 12009
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 085 060 030 Pre-fail Always - 342773697
9 Power_On_Hours 0x0032 045 045 000 Old_age Always - 48774
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 095 095 020 Old_age Always - 5994
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 095 000 Old_age Always - 2376
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 058 051 045 Old_age Always - 42 (Min/Max 42/42)
194 Temperature_Celsius 0x0022 042 049 000 Old_age Always - 42 (0 7 0 0 0)
195 Hardware_ECC_Recovered 0x001a 020 020 000 Old_age Always - 49175639
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 65425 (214 186 0)
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 1146993829
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 941662174
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
# smartctl -a /dev/sdb
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.19.4-sky1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate BarraCuda 3.5 (CMR)
Device Model: ST1000DM010-2EP102
Serial Number: ZN1B7GB1
LU WWN Device Id: 5 000c50 0c39fc983
Firmware Version: CC43
User Capacity: 1 000 204 886 016 bytes [1,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5319
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Fri Aug 26 16:29:09 2022 MSK
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 109) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x1085) SCT Status supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 079 063 006 Pre-fail Always - 92404059
3 Spin_Up_Time 0x0003 097 096 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1196
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 078 060 045 Pre-fail Always - 80952748
9 Power_On_Hours 0x0032 086 086 000 Old_age Always - 12867
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 099 099 020 Old_age Always - 1195
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 0 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 058 053 040 Old_age Always - 42 (Min/Max 25/42)
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 1205
194 Temperature_Celsius 0x0022 042 010 000 Old_age Always - 42 (0 10 0 0 0)
195 Hardware_ECC_Recovered 0x001a 002 001 000 Old_age Always - 92404059
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 12866h+15m+47.267s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 6783851971
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 7991861386
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
От root-а запустил случайно:
# pip install pdf2odt
Collecting pdf2odt
Downloading pdf2odt-0.7.0.tar.gz (60 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.4/60.4 kB 770.6 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting colorama
Downloading colorama-0.4.5-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: setuptools in /usr/lib/python3.10/site-packages (from pdf2odt) (63.1.0)
Collecting officegenerator
Downloading officegenerator-1.28.0.tar.gz (130 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.8/130.8 kB 2.1 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in /usr/lib/python3.10/site-packages (from pdf2odt) (9.2.0)
Collecting tqdm
Downloading tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.4/78.4 kB 7.8 MB/s eta 0:00:00
Collecting odfpy==1.3.6
Downloading odfpy-1.3.6.tar.gz (691 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 691.1/691.1 kB 5.6 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting openpyxl
Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.1/242.1 kB 1.3 MB/s eta 0:00:00
Collecting et-xmlfile
Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Using legacy 'setup.py install' for pdf2odt, since package 'wheel' is not installed.
Using legacy 'setup.py install' for officegenerator, since package 'wheel' is not installed.
Using legacy 'setup.py install' for odfpy, since package 'wheel' is not installed.
Installing collected packages: odfpy, tqdm, et-xmlfile, colorama, openpyxl, officegenerator, pdf2odt
Running setup.py install for odfpy ... done
Running setup.py install for officegenerator ... done
Running setup.py install for pdf2odt ... done
Successfully installed colorama-0.4.5 et-xmlfile-1.1.0 odfpy-1.3.6 officegenerator-1.28.0 openpyxl-3.0.10 pdf2odt-0.7.0 tqdm-4.64.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Полезная штука эта bindfs...
Т.к. про bindfs на LOR что-то мало, дарю сообществу полезный (кмк) скрипт dir2squash
:
#!/bin/bash
USAGE() {
echo "Use: $(basename $0) [-h] [-p permission] [-o outfile] sourcedir
Options:
-h - Help and exit;
-p - Permission (default: a=wrX)
e.g. og-x,og+rD,u=rwX,g+rw or 0644,a+X ;
-o - Output file."
}
#====================================================
while getopts ":hp:o:" opt_name
do
case "$opt_name" in
"h") USAGE; exit 2 ;;
"p") p="-p ${OPTARG}" ;;
"o") o="${OPTARG}" ;;
":") USAGE; exit 1 ;;
"?") echo "Unknown option: '-${OPTARG}'"; USAGE; exit 1 ;;
esac
done
shift "$((OPTIND-1))"
[ $# -eq 0 ] && echo "Error: missing sourcedir." && USAGE && exit 3
sourcedir=$1
echo "sourcedir: "${sourcedir}""
[ ! -d "${sourcedir}" ] && echo "Error: sourcedir is not a directory." && USAGE && exit 4
name=$(basename "$1")
[ -n "${p}" ] || p='-p a=wrX'
[ -n "${o}" ] || o="/tmp/${name}-$(date +%F_%H%M%S).lz4.squash"
wrk=$(mktemp -d) # дир. куда будем монтировать с помощью bindfs для подмены прав
bindfs -o ro ${p} --no-allow-other "${sourcedir}" "${wrk}"
mksquashfs "${wrk}" "${o}" -comp lz4 -b 1M -all-root -no-xattrs && echo "out: ${o}"
fusermount -u -z "${wrk}"
rm -Rf "${wrk}"
Подскажите команду для удаления из кеша старых версий пакетов.
Вот пример списка пакетов, из которых надо оставить только самые последние (помечены <---), а остальные удалить.
$ ls -1
linux5.15-5.15.24_1.x86_64.xbps
linux5.15-5.15.24_1.x86_64.xbps.sig
linux5.15-5.15.26_1.x86_64.xbps
linux5.15-5.15.26_1.x86_64.xbps.sig
linux5.15-5.15.28_1.x86_64.xbps
linux5.15-5.15.28_1.x86_64.xbps.sig
linux5.15-5.15.30_1.x86_64.xbps
linux5.15-5.15.30_1.x86_64.xbps.sig
linux5.15-5.15.32_1.x86_64.xbps
linux5.15-5.15.32_1.x86_64.xbps.sig
linux5.15-5.15.34_1.x86_64.xbps <---
linux5.15-5.15.34_1.x86_64.xbps.sig <---
linux5.15-headers-5.15.24_1.x86_64.xbps
linux5.15-headers-5.15.24_1.x86_64.xbps.sig
linux5.15-headers-5.15.26_1.x86_64.xbps
linux5.15-headers-5.15.26_1.x86_64.xbps.sig
linux5.15-headers-5.15.28_1.x86_64.xbps
linux5.15-headers-5.15.28_1.x86_64.xbps.sig
linux5.15-headers-5.15.30_1.x86_64.xbps
linux5.15-headers-5.15.30_1.x86_64.xbps.sig
linux5.15-headers-5.15.32_1.x86_64.xbps
linux5.15-headers-5.15.32_1.x86_64.xbps.sig
linux5.15-headers-5.15.34_1.x86_64.xbps <---
linux5.15-headers-5.15.34_1.x86_64.xbps.sig <---
linux-base-2021.07.21_1.x86_64.xbps <---
linux-base-2021.07.21_1.x86_64.xbps.sig <---
linux-firmware-amd-20211027_1.x86_64.xbps
linux-firmware-amd-20211027_1.x86_64.xbps.sig
linux-firmware-amd-20220209_1.x86_64.xbps
linux-firmware-amd-20220209_1.x86_64.xbps.sig
linux-firmware-amd-20220310_1.x86_64.xbps <---
linux-firmware-amd-20220310_1.x86_64.xbps.sig <---
Решил настроить sshd и наткнулся на такие чудеса. Собственно вопрос в названии темы.
$ pwd
/etc
$ ls -l ssh*
итого 504
-rw-r--r-- 1 root root 505489 мар 4 01:31 moduli
-rw-r--r-- 1 root root 1531 мар 4 01:31 ssh_config
-rw-r--r-- 1 root root 3107 мар 4 01:31 sshd_config
$ cat sshd_config
cat: sshd_config: Нет такого файла или каталога
$ stat sshd_config
stat: не удалось выполнить statx для 'sshd_config': Нет такого файла или каталога
$ grep 'found: NO' meson_build.log
gstreamer| Program hotdoc found: NO
gst-plugins-base| Run-time dependency bcm_host found: NO (tried pkgconfig and cmake)
gst-plugins-base| Library bcm_host found: NO
gst-plugins-base| Library nvbuf_utils found: NO
gst-plugins-base| Run-time dependency cdparanoia-3 found: NO (tried pkgconfig and cmake)
gst-plugins-base| Run-time dependency vorbisidec found: NO (tried pkgconfig and cmake)
gst-plugins-base| Program hotdoc found: NO
gst-plugins-good| Run-time dependency mp3lame found: NO (tried pkgconfig and cmake)
gst-plugins-good| Program hotdoc found: NO
gst-plugins-bad| Run-time dependency opencv found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency xkbcommon-x11 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Program glslc found: NO
gst-plugins-bad| Run-time dependency ltc found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Library ml_audio found: NO
gst-plugins-bad| Library lumin_rt_core_1_7 found: NO
gst-plugins-bad| Library lumin_rt_app_1_7 found: NO
gst-plugins-bad| Library OpenSLES found: NO
gst-plugins-bad| Run-time dependency tinyalsa found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Dependency tinyalsa from subproject tinyalsa found: NO (subproject failed to configure)
gst-plugins-bad| Library ole32 found: NO
gst-plugins-bad| Library ksuser found: NO
gst-plugins-bad| Library ole32 found: NO
gst-plugins-bad| Library ksuser found: NO
gst-plugins-bad| Library runtimeobject found: NO
gst-plugins-bad| Library mmdevapi found: NO
gst-plugins-bad| Library mfplat found: NO
gst-plugins-bad| Run-time dependency avtp found: NO (tried pkgconfig and cmake)
avtp| Run-time dependency cmocka found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency libssh2 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency directfb found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Library faac found: NO
gst-plugins-bad| Run-time dependency storage_client found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency webrtc-audio-coding-1 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency lrdf found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency ldacbt-enc found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency microdns found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency neon found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency libonnxruntime found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency libopenaptx found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency opencv found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency openh264 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency libopenni2 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency libqrencode found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency svthevcenc found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency wildmidi found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency wpe-webkit-1.1 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency wpe-webkit-1.0 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency wpebackend-fdo-1.0 found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Run-time dependency zxing found: NO (tried pkgconfig and cmake)
gst-plugins-bad| Program hotdoc found: NO
gst-plugins-ugly| Program hotdoc found: NO
gst-libav| Program hotdoc found: NO
gst-rtsp-server| Program hotdoc found: NO
gst-devtools| Program hotdoc found: NO
gst-editing-services| Program hotdoc found: NO
gstreamer-vaapi| Program hotdoc found: NO
Program hotdoc found: NO
Как получить слово перед «found: NO» ?
Пока правильный результат только у ABW
Как правильно с этим работать?
$ echo ololo > -111-
$ cat -111-
cat: неверный ключ — «1»
По команде «cat --help» можно получить дополнительную информацию.
$ cat "-111-"
cat: неверный ключ — «1»
По команде «cat --help» можно получить дополнительную информацию.
$ cat "\-111\-"
cat: '\-111\-': Нет такого файла или каталога
$ cat ./-111-
ololo
следующие → |