AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-46433

stdcerr's questions

Martin Hope
stdcerr
Asked: 2023-10-30 01:25:59 +0800 CST

无法在 Fedora 38 上安装 google-drive-ocamlfuse

  • 5

我想将 Google 驱动器安装到本地目录,为此,我想安装google-drive-ocamlfuse在最新的 Fedora 38 上,但出现以下错误:

$ sudo dnf install google-drive-ocamlfuse
Last metadata expiration check: 0:21:15 ago on Sun 29 Oct 2023 09:59:45 AM.
Error: 
 Problem: package google-drive-ocamlfuse-0.7.22-3.fc33.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse requires ocaml-ocamlfuse > 2.7.1, but none of the providers can be installed
  - conflicting requests
  - nothing provides ocaml(CamlinternalFormatBasics) = b6c6694955e10001aed267571104a961 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Com) = 26b1234e7a6d75ba1450cb5357f5483c needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Condition) = 76cd8b455eb0162ced68da0cd9930f3a needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Mutex) = ec993c9491bec46cd3ee373f9d313390 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib) = 4b04b4eda19aa722df365141895fb347 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__bigarray) = 73871e61e3785d8f0d822194daeb85ec needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__callback) = 21c02abb4cc9eea752b0e9ab3b1a0e6a needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__complex) = 81367aaa1be1ccaf16610a96c3d2bc13 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__either) = 2555bf09b020b8887a4d8a645b0ed347 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__hashtbl) = c3ec10b93bb358686d02fa9c5f4adb6b needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__list) = 88609ef3a3066dcf16ad7456f53122d2 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__seq) = 185075aa99b059ad4cae15cb411fcc0c needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Stdlib__string) = 9f0e42299fccc5fb76df62d28ba67759 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Thread) = a5f19c00abf12e43bcffa2998c478777 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocaml(Unix) = eadecc353e942963afccd09bd1a12192 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Condition) = 2f0a4dd0f67fcd0ce2134d45cebebdc6 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Mutex) = 9e92b5f80ce643a8259210bbb7a4e1e3 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Stdlib) = 905355729c82ef4d2184c394a250f1a3 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Stdlib__callback) = f51ffea73ea6512880e00974c161a04c needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Stdlib__hashtbl) = d6c11956a20f699b6d99ffbeaf7af8ce needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Stdlib__list) = 53d7956dcffc648bb93ed4703fe49f2c needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Thread) = 5b8312fda8f617d11b90ef0b5611e3d9 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
  - nothing provides ocamlx(Unix) = 6cad08ee79360aa0781ccb2644c36087 needed by ocaml-ocamlfuse-2.7.2-0.3.git08f90ac.fc35.x86_64 from copr:copr.fedorainfracloud.org:jgoguen:google-drive-ocamlfuse
(try to add '--skip-broken' to skip uninstallable packages)

有人可以帮我解决这个问题吗?

fedora
  • 1 个回答
  • 10 Views
Martin Hope
stdcerr
Asked: 2023-08-09 12:47:50 +0800 CST

为什么 btrfs /home/ 分区在登录时不断挂载 ro?

  • 6

/home我在安装/dev/sdb1btrfs 分区时遇到问题。ro即使我从 U 盘启动、运行检查并确认可以安装它,它仍然会继续安装rw。为什么在我的“真实”系统上启动时它仍然会安装ro?我的 fstab 行看起来像

UUID=ba093e47-a5d2-4753-b39e-64413066d9c8 /home                   btrfs   defaults,subvol=/ 0 2

dmesg向我展示:

[   36.655791] BTRFS: error (device sdb1: state A) in __btrfs_free_extent:3053: errno=-117 Filesystem corrupted
[   36.655795] BTRFS info (device sdb1: state EA): forced readonly
[   36.655796] BTRFS error (device sdb1: state EA): failed to run delayed ref for logical 574194106368 num_bytes 16384 type 176 action 2 ref_mod 1: -117
[   36.655799] BTRFS: error (device sdb1: state EA) in btrfs_run_delayed_refs:2127: errno=-117 Filesystem corrupted
[   50.043538] BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
[   50.043553] BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 992, gen 0
[   50.058816] BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
[   50.058828] BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 993, gen 0
[   50.059196] BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
[   50.059199] BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 994, gen 0

我正在跑步Fedora 38。

更新

在实时系统 ( Fedora 36) 上我运行btrfs check /dev/sdb1并得到:

$ sudo btrfs check /dev/sdb1
Opening filesystem to check...
Checking filesystem on /dev/sdb1
UUID: ba093e47-a5d2-4753-b39e-64413066d9c8
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 890685730816 bytes used, no error found
total csum bytes: 865299716
total tree bytes: 3958702080
total fs tree bytes: 2745729024
total extent tree bytes: 193478656
btree space waste bytes: 706285981
file data blocks allocated: 2916973436928
 referenced 946788216832
# smartctl -a /dev/sdb1
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.17.5-300.fc36.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 860 EVO 1TB
Serial Number:    S599NE0M906370Y
LU WWN Device Id: 5 002538 e0990fd94
Firmware Version: RVT03B6Q
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Aug  9 23:29:31 2023 EDT
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:            (0x53) 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.
                    No 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:    (   2) minutes.
Extended self-test routine
recommended polling time:    (  85) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       7874
 12 Power_Cycle_Count       0x0032   096   096   000    Old_age   Always       -       3676
177 Wear_Leveling_Count     0x0013   097   097   000    Pre-fail  Always       -       39
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   071   049   000    Old_age   Always       -       29
195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       199
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       82270594760

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
  256        0    65535  Read_scanning was never started
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.

更新2

btrfs我从实时系统(实际上是我系统的根分区)对我的其他分区进行了检查,这就是我得到的结果:

# btrfs check /dev/sda3
Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: c8ff2d36-e51d-410e-b4f5-64b0b0f4a331
[1/7] checking root items
[2/7] checking extents
data backref 2606956544 root 257 owner 607657 offset 0 num_refs 0 not found in extent tree
incorrect local backref count on 2606956544 root 257 owner 607657 offset 0 found 1 wanted 0 back 0x560968e1b9e0
incorrect local backref count on 2606956544 root 257 owner 615849 offset 0 found 0 wanted 1 back 0x560968134cf0
backref disk bytenr does not match extent record, bytenr=2606956544, ref bytenr=0
backpointer mismatch on [2606956544 8192]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 29946847232 bytes used, error(s) found
total csum bytes: 27541272
total tree bytes: 1149894656
total fs tree bytes: 1045790720
total extent tree bytes: 65536000
btree space waste bytes: 236775382
file data blocks allocated: 42231439360
 referenced 61500862464

由于某种原因,该分区似乎存在问题,可能导致/dev/sdb1无法正确安装?很奇怪但是...

# smartctl -a /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.17.5-300.fc36.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 860 EVO 1TB
Serial Number:    S5B3NR0NB18446P
LU WWN Device Id: 5 002538 e30b15691
Firmware Version: RVT04B6Q
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Aug  9 23:42:26 2023 EDT
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:            (0x53) 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.
                    No 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:    (   2) minutes.
Extended self-test routine
recommended polling time:    (  85) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       5877
 12 Power_Cycle_Count       0x0032   097   097   000    Old_age   Always       -       2778
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       11
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   072   051   000    Old_age   Always       -       28
195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       211
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       17129640751

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.

我打电话吗btrfs check --repair /dev/sda?

更新3

运行上述命令后,我的错误似乎已修复:

# btrfs check /dev/sda3
Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: c8ff2d36-e51d-410e-b4f5-64b0b0f4a331
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 29946847232 bytes used, no error found
total csum bytes: 27541272
total tree bytes: 1149894656
total fs tree bytes: 1045790720
total extent tree bytes: 65536000
btree space waste bytes: 236775382
file data blocks allocated: 42231439360
 referenced 61500862464

当启动我的系统时,我的 /home partiution finally got mountedrw` 再次出现,耶!这是一个奇怪的问题,我想知道会发生什么......

哎哟,启动系统后一分钟,我的分区ro再次进入模式:

$ mount | grep home
/dev/sdb1 on /home type btrfs (ro,relatime,seclabel,ssd,discard=async,space_cache,subvolid=5,subvol=/)

我再次从实时 USB 启动,现在看来两个分区都正常:

# btrfs check /dev/sdb1
Opening filesystem to check...
Checking filesystem on /dev/sdb1
UUID: ba093e47-a5d2-4753-b39e-64413066d9c8
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 890685755392 bytes used, no error found
total csum bytes: 865299740
total tree bytes: 3958702080
total fs tree bytes: 2745729024
total extent tree bytes: 193478656
btree space waste bytes: 706284856
file data blocks allocated: 2916973461504
 referenced 946788241408
[root@localhost-live liveuser]# btrfs check /dev/sda3
Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: c8ff2d36-e51d-410e-b4f5-64b0b0f4a331
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 29930229760 bytes used, no error found
total csum bytes: 27525076
total tree bytes: 1149861888
total fs tree bytes: 1045872640
total extent tree bytes: 65437696
btree space waste bytes: 236752423
file data blocks allocated: 41929781248
 referenced 61485907968

看起来,当我在登录屏幕上时,我的主分区已安装,rw并且仅在登录 Plasma 期间,它才会安装ro。当我跑步时,$ journalctl | grep -i btrfs我收到很多消息,包括:

Aug 09 21:50:14 DesktopRon kernel: RIP: 0010:__btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  __btrfs_run_delayed_refs+0x7a2/0x11d0
Aug 09 21:50:14 DesktopRon kernel:  btrfs_run_delayed_refs+0x59/0x200
Aug 09 21:50:14 DesktopRon kernel:  ? btrfs_reduce_alloc_profile+0x8c/0x180
Aug 09 21:50:14 DesktopRon kernel:  btrfs_preempt_reclaim_metadata_space+0x97/0x1c0
Aug 09 21:50:14 DesktopRon kernel: BTRFS: error (device sdb1: state A) in __btrfs_free_extent:3053: errno=-117 Filesystem corrupted
Aug 09 21:50:14 DesktopRon kernel: BTRFS info (device sdb1: state EA): forced readonly
Aug 09 21:50:14 DesktopRon kernel: BTRFS error (device sdb1: state EA): failed to run delayed ref for logical 574194106368 num_bytes 16384 type 176 action 2 ref_mod 1: -117
Aug 09 21:50:14 DesktopRon kernel: BTRFS: error (device sdb1: state EA) in btrfs_run_delayed_refs:2127: errno=-117 Filesystem corrupted
Aug 09 21:50:19 DesktopRon abrt-notification[3148]: System encountered a non-fatal error in __btrfs_free_extent()
Aug 09 21:50:20 DesktopRon kernel: BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
Aug 09 21:50:20 DesktopRon kernel: BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 992, gen 0
Aug 09 21:50:20 DesktopRon kernel: BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
Aug 09 21:50:20 DesktopRon kernel: BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 993, gen 0
Aug 09 21:50:20 DesktopRon kernel: BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
Aug 09 21:50:20 DesktopRon kernel: BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 994, gen 0

如何让分区rw在启动时再次装入模式?

fedora
  • 2 个回答
  • 54 Views
Martin Hope
stdcerr
Asked: 2022-01-28 12:11:08 +0800 CST

如何在 Weston 中设置键盘重复延迟

  • 3

我正在使用 Wayland & Weston 的平台上工作,到目前为止我只安装了 Wayland-Terminal 应用程序。我可以启动它,但它无法使用,因为我不能输入一个字母,它会不断重复很多次。似乎键盘重复延迟设置得太低了。根据http://manpages.ubuntu.com/manpages/bionic/man5/weston.ini.5.html#keyboard%20section我添加了一个[keyboard]部分,/etc/xdg/weston/weston.ini现在看起来像:

[core]
idle-time=0
require-input=false
repaint-window=17
[keyboard]
repeat-rate=50
repeat-delay=500

但是重新启动后,键盘仍然无法使用,似乎根本没有任何变化。任何人都可以帮助解决这个问题?谢谢!

linux configuration
  • 1 个回答
  • 122 Views
Martin Hope
stdcerr
Asked: 2019-12-14 11:39:17 +0800 CST

如何在执行cmds之前等待直到出现提示?

  • 0

如何在我可以执行的某些主机上执行其他命令(例如在 bash 脚本中?)之前等待 shell 提示出现ssh user@host echo "test";并且它会登录,并在准备好时执行 echo "test" - 但看起来它没有在每个主机上工作。我想在继续执行之前等待#或提示出现- 我该怎么做?$echo "test"

当我这样做时ssh user@host,等待#并手动执行echo "test"它会按您的预期工作。如何将其放入脚本中?ssh user@host -t echo "test"也不起作用。

我特别想做一些类似的事情:ssh -o StrictHostKeyChecking=no -p 2222 user@host -t tail -f /var/log/MyFile.log即尾随主机的日志文件并在本地外壳上显示结果而不是尾随日志文件,它只是让我进入提示:

No entry for terminal type "screen";
using dumb terminal settings.
#

-->请忽略提示是root,这不是该线程的一部分。是的,它是从屏幕会话中启动的——从普通终端(xterm),它说No entry for terminal type "xterm";(例如)。

没有-t我得到FATAL: not a terminal,它把我扔回本地外壳。

linux bash
  • 2 个回答
  • 1136 Views
Martin Hope
stdcerr
Asked: 2019-11-16 17:45:38 +0800 CST

Evolution 无法连接到我的 Google 日历

  • 3

我已经使用我的 Google 帐户(在https://myaccount.google.com/security下)配置了两步验证。带有 OAuth 2 的电子邮件似乎可以通过,但我不断收到

"Failed to connect calendar “[email protected] : MyName” 
Data source “MyName” does not support OAuth 2.0 authentication

和

Failed to connect address book “[email protected] : Contacts”

为什么会这样,我该如何解决?

我正在使用进化 3.34.1

synchronization
  • 1 个回答
  • 853 Views
Martin Hope
stdcerr
Asked: 2019-10-12 06:53:19 +0800 CST

在使用动态 IP 的两台主机之间建立一致的隧道

  • 1

我想在两台主机之间建立一个恒定的 ssh 隧道。现在它变得很棘手,因为两个主机都可能更改它们的 IP(虽然不是同时)。我克服这个问题的想法是使用autoissh(A->B& B->A)我的思维实验从每个主机建立两个反向隧道:

并且一旦A改变它的IP:

B仍然可以访问A,因为来自的反向隧道A->B 仍然存在,脚本B将意识到 IP 的 IPA已更改(例如通过轮询ipchicken.comB->A ),并且必须重新建立来自的反向隧道。

这也可以反过来工作……对吗?bash除了使用and之外,有没有更好的解决方案来实现这一点autossh?

shell-script
  • 1 个回答
  • 188 Views
Martin Hope
stdcerr
Asked: 2019-09-26 20:34:07 +0800 CST

mkfs.vfat 在我的磁盘上找不到第一个分区

  • 0

我想安装Arch Linux在我的Raspberry Pi 3,我发现这个 选项卡[安装]文章逐步描述了这个过程:现在,当我尝试vfat在第一个分区上创建 fs 时遇到了一个问题:我的分区表:

Command (m for help): p
Disk /dev/mmcblk0p7: 28.4 GiB, 30438064128 bytes, 59449344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x11a5fc51

Device           Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p7p1        2048   206847   204800  100M  c W95 FAT32 (LBA)
/dev/mmcblk0p7p2      206848 59449343 59242496 28.3G 83 Linux

但仍然:

root@raspberrypi:/home/pi# mkfs.vfat /dev/mmcblk0p7p1
mkfs.fat 4.1 (2017-01-24)
mkfs.vfat: unable to open /dev/mmcblk0p7p1: No such file or directory

为什么会这样,我该如何解决?

arch-linux
  • 1 个回答
  • 1371 Views
Martin Hope
stdcerr
Asked: 2019-09-22 14:42:14 +0800 CST

vncviewer 可以将 alt 键转发到服务器以进行应用程序切换吗?

  • 1

我正在使用tightvnc vncviewer从我运行的 Linux 机器连接到 Windows10 服务器Ubuntu。现在我希望可以选择使用 alt-tab over vnc 在 Windows 机器上的应用程序之间切换。我在网上找到了大量描述这一点的文章,但它们似乎都指的是在 Windows 上运行的 vncviewer,我没有找到任何关于它的 Linux 版本的信息。任何人都可以帮忙吗?

我还在组中启动了一个单独的线程:comp.os.linux.networking(主题“vncviewer 可以将 alt 键转发到服务器以进行应用程序切换吗?”) - - 我将确保答案在两个单独的线程之间同步!

keyboard-shortcuts
  • 1 个回答
  • 718 Views
Martin Hope
stdcerr
Asked: 2019-08-30 19:12:47 +0800 CST

/usr/bin/which 在 Arch 上

  • 2

我的 Arch Linux 容器中缺少该which命令。

在我的主机发行版 ( Ubuntu) 中,它位于/usr/bin/which,我已经完成了一个pacman -Ss which,pacman -S core/gnutls但它仍然不可用。如何将它安装在我的Arch容器中?

pacman -Qo /usr/bin/which只给我 error: No package owns /usr/bin/which

arch-linux docker
  • 1 个回答
  • 628 Views
Martin Hope
stdcerr
Asked: 2019-05-10 16:54:14 +0800 CST

通过 ssh 在远程主机上执行 telnet 时如何在 telnet 中制表符?

  • 2

当我通过 ssh 在远程主机上使用 telnet 时如何使用tab,我有类似的东西:

ssh -o StritHopstKeyChecking=no -p port user@hostA telnet hostB; echo "Reconnect?"; while read < /dev/tty; do ssh -o StritHopstKeyChecking=no -p port user@hostA telnet hostB; done 

它启动了 telnet 会话,hostB但hostA在 telnet 内部,我不能tab用于自动完成,当我手动 ssh 进入hostA然后hostB从那里 telnet 时,我可以使用它。有任何想法吗?

ssh autocomplete
  • 1 个回答
  • 256 Views
Martin Hope
stdcerr
Asked: 2019-05-02 07:29:26 +0800 CST

如何使用通配符作为前缀重命名多个文件

  • 1

假设我有很多文件名,例如:

foo_192.168.1.1.sh
bar_192.168.1.1.sh
baz_192.168.1.1.sh
qux_192.168.1.1.sh

我想将它们全部重命名为

foo_192.168.1.100.sh
bar_192.168.1.100.sh
baz_192.168.1.100.sh
qux_192.168.1.100.sh

我将如何做到最好?

mv *.1.sh .100.sh不起作用。

linux bash
  • 1 个回答
  • 71 Views
Martin Hope
stdcerr
Asked: 2018-11-07 20:08:38 +0800 CST

仅从 s3 存储中复制特定日期的文件

  • 1

我只想从包含 100 个文件的某个存储桶中复制来自今天的 S3 文件。我尝试了以下方法:$ aws s3 ls s3://cve-etherwan/ --recursive --region=us-west-2 | grep 2018-11-06 | awk '{system("aws s3 sync s3://cve-etherwan/$4 . --region=us-west-2") }'但效果不佳,我还从其他日期获取文件。我该如何正确地做到这一点?

file-copy date
  • 3 个回答
  • 8788 Views
Martin Hope
stdcerr
Asked: 2018-11-07 05:43:10 +0800 CST

如何通过 ssh 隧道重定向受限网络中的网站

  • 1

我已经建立了一个反向 ssh 隧道到一个aws服务器的受限网络,即访问它,我 ssh 到aws服务器,然后从那里我可以在某个自定义端口上访问受限网络中的机器。

在这个受限网络上,有些设备可以通过 Web 浏览器进行配置。

我相信我可以做一些事情,比如ssh -R 8080:deviceIP:80 user@aws把它转发到aws机器上,但我仍然无法访问它(除了通过非常慢的远程 X 之外)。我如何通过管道deviceIP:80连接到家里的浏览器aws?

我已经尝试了上面的 ssh 命令,然后将我家用计算机上的浏览器定向到aws:8080但没有加载任何页面......

ssh ssh-tunneling
  • 2 个回答
  • 5030 Views
Martin Hope
stdcerr
Asked: 2018-11-04 13:16:00 +0800 CST

在 Ubuntu 启动时使用 autossh 启动反向隧道

  • 1

我想在系统启动时启动 ssh 反向隧道。下面的行让我建立隧道很好 - 但我最终被登录到server我不想要的地方,尤其是不是来自初始化脚本。

/usr/bin/autossh -M 22222 -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -i /path/to/my/key.key -R 9999:localhost:22 ubuntu@server

man autossh说该-f选项应该满足我的需要:

导致 autossh 在运行 ssh 之前进入后台。

但问题是,当我将命令更改为usr/bin/autossh -f -M.... 我已经将其作为我的初始化脚本的一部分进行了尝试,如下所示:

#! /bin/sh
### BEGIN INIT INFO
### END INIT INFO
case "$1" in
    start)
        echo "Starting autossh"
        /usr/bin/autossh -M 22222 -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -i /path/to/the.key -R pppp:localhost:22 user@server
    ;;
    stop)
        echo -n "Shutting down utossk"
        /usr/bin/killall -KILL autossh
    ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac
exit 0

但是我需要一个选项来把它扔到后台,如果 -f 选项对我不起作用,我该怎么做?

background-process ssh-tunneling
  • 1 个回答
  • 1000 Views
Martin Hope
stdcerr
Asked: 2018-11-04 04:50:33 +0800 CST

添加额外的密钥对进行身份验证

  • 0

我需要一个新的密钥对,用于允许登录到服务器的其他主机(但由于安全原因,我无法共享现有的密钥对)。

现在,我在服务器上创建了一对工作正常的新对ssh-keygen -t rsa -f newkey.key,然后我将它们的密钥复制到客户端并尝试使用登录ssh user@server -i newkey.key但它不会让我进入,而是我得到:

$ ssh user@server -i newkey.key
Warning: Permanently added 'server' (ECDSA) to list ofknown hosts.
Permission denied (publickey).
$

为什么会这样,我该如何进行?newkey.key权限设置为400。

key-authentication ssh-keygen
  • 1 个回答
  • 109 Views
Martin Hope
stdcerr
Asked: 2018-10-16 13:14:09 +0800 CST

如何在多个文本文件中移动行?[复制]

  • 1
这个问题在这里已经有了答案:
在不使用临时文件的情况下将前 N 行输出移动到结尾 8 个答案
4年前关闭。

嗨假设我有一个看起来像这样的文件:

x
x
x
A
B
C
1
2
3
D
E
F
x
x
x

以及需要文件看起来像什么:

x
x
x
A
B
C
D
E
F
1
2
3
x
x
x

我知道我可以用几sed -i s/search/replace/g行来做到这一点,但我想知道是否有更好、更简单的方法可以在任一方向上x按数字移动行y数?

text-processing
  • 2 个回答
  • 570 Views
Martin Hope
stdcerr
Asked: 2018-09-03 16:01:35 +0800 CST

将端口 80 重新映射到 22

  • 0

我想将端口 80 上的传入请求重新映射到端口 22 并尝试以下操作:sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-ports 22但是,仍然ssh -i key user@host -p 80不让我连接,我想知道为什么不呢?

编辑1

$ sudo iptables-save -c
sudo: unable to resolve host DevRon
# Generated by iptables-save v1.6.0 on Mon Sep  3 00:23:20 2018
*nat
:PREROUTING ACCEPT [21:1260]
:INPUT ACCEPT [21:1260]
:OUTPUT ACCEPT [254:15716]
:POSTROUTING ACCEPT [254:15716]
[0:0] -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 22
[0:0] -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 22
[0:0] -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
COMMIT
# Completed on Mon Sep  3 00:23:20 2018
# Generated by iptables-save v1.6.0 on Mon Sep  3 00:23:20 2018
*filter
:INPUT ACCEPT [41307:2896000]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [41123:2886089]
COMMIT
# Completed on Mon Sep  3 00:23:20 2018
ssh iptables
  • 2 个回答
  • 284 Views
Martin Hope
stdcerr
Asked: 2018-08-23 12:52:37 +0800 CST

Vm 中的新磁盘显示为 ata2

  • 2

管理员在我的 VM 中添加了一个新磁盘,ata2在我重新扫描 scsi 控制器后显示为:

root@jpax-build07:~# echo "- - -" > /sys/class/scsi_host/host0/scan
root@jpax-build07:~# echo "- - -" > /sys/class/scsi_host/host1/scan
root@jpax-build07:~# echo "- - -" > /sys/class/scsi_host/host2/scan
fdisk -l

但它没有显示在fdisk -l我如何创建一个 fs 并安装它?

# fdisk -l
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa8c4da68
...

/dev/sda是现有磁盘

dmesg:

[10600270.932925] ata2: soft resetting link
[10600271.122685] ata2.00: configured for UDMA/33
[10600271.123105] ata2: EH complete
[10600430.666938] ata1: soft resetting link
[10600430.836638] ata1: EH complete
[10600467.936948] ata2: soft resetting link
[10600468.122680] ata2.00: configured for UDMA/33
[10600468.123125] ata2: EH complete
mount hard-disk
  • 1 个回答
  • 135 Views
Martin Hope
stdcerr
Asked: 2018-08-10 11:01:01 +0800 CST

当进程死亡时共享内存区域会发生什么?

  • 1

我想知道当shmget()任何进程终止或死?该区域是被释放还是会持续存在?

linux process
  • 2 个回答
  • 3488 Views
Martin Hope
stdcerr
Asked: 2018-07-13 14:33:36 +0800 CST

从 JSON 字符串中提取数据

  • 2

我必须提取一个车牌数字,它与 JSON 字符串相关的置信度如下所示:

{
  "response": {
    "container": {
      "id": "0df307bc-06b2-45cf-b7ff-ce07fd04e04d",
      "timestamp": "2018-Jul-10 17:34:27.448632"
    },
    "id": "00000002-0000-0000-0000-000000000015"
  },
  "frames": {
    "frame": {
      "id": "5583",
      "timestamp": "2016-Nov-30 13:05:27",
      "lps": {
        "lp": {
          "licenseplate": "15451BBL",
          "text": "15451BBL",
          "wtext": "15451BBL",
          "confidence": "20",
          "bkcolor": "16777215",
          "color": "16777215",
          "type": "0",
          "ntip": "11",
          "cct_country_short": "",
          "cct_state_short": "",
          "tips": {
            "tip": {
              "poly": {
                "p": { "x": "1094", "y": "643" },
                "p": { "x": "1099", "y": "643" },
                "p": { "x": "1099", "y": "667" },
                "p": { "x": "1094", "y": "667" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "49",
              "code_ascii": "1",
              "confidence": "97"
            },
            "tip": {
              "poly": {
                "p": { "x": "1103", "y": "642" },
                "p": { "x": "1113", "y": "642" },
                "p": { "x": "1112", "y": "667" },
                "p": { "x": "1102", "y": "667" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "53",
              "code_ascii": "5",
              "confidence": "89"
            },
            "tip": {
              "poly": {
                "p": { "x": "1112", "y": "640" },
                "p": { "x": "1122", "y": "640" },
                "p": { "x": "1122", "y": "666" },
                "p": { "x": "1112", "y": "666" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "52",
              "code_ascii": "4",
              "confidence": "97"
            },
            "tip": {
              "poly": {
                "p": { "x": "1123", "y": "640" },
                "p": { "x": "1132", "y": "640" },
                "p": { "x": "1131", "y": "665" },
                "p": { "x": "1123", "y": "665" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "53",
              "code_ascii": "5",
              "confidence": "97"
            },
            "tip": {
              "poly": {
                "p": { "x": "1134", "y": "640" },
                "p": { "x": "1139", "y": "640" },
                "p": { "x": "1139", "y": "664" },
                "p": { "x": "1133", "y": "664" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "49",
              "code_ascii": "1",
              "confidence": "77"
            },
            "tip": {
              "poly": {
                "p": { "x": "1154", "y": "639" },
                "p": { "x": "1163", "y": "639" },
                "p": { "x": "1163", "y": "663" },
                "p": { "x": "1153", "y": "663" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "66",
              "code_ascii": "B",
              "confidence": "97"
            },
            "tip": {
              "poly": {
                "p": { "x": "1164", "y": "638" },
                "p": { "x": "1173", "y": "638" },
                "p": { "x": "1173", "y": "663" },
                "p": { "x": "1163", "y": "663" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "66",
              "code_ascii": "B",
              "confidence": "94"
            },
            "tip": {
              "poly": {
                "p": { "x": "1191", "y": "637" },
                "p": { "x": "1206", "y": "636" },
                "p": { "x": "1205", "y": "660" },
                "p": { "x": "1190", "y": "661" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "76",
              "code_ascii": "L",
              "confidence": "34"
            },
            "tip": {
              "poly": {
                "p": { "x": "1103", "y": "655" },
                "p": { "x": "1111", "y": "655" },
                "p": { "x": "1111", "y": "667" },
                "p": { "x": "1103", "y": "667" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "74",
              "code_ascii": "J",
              "confidence": "57"
            },
            "tip": {
              "poly": {
                "p": { "x": "1103", "y": "655" },
                "p": { "x": "1111", "y": "655" },
                "p": { "x": "1111", "y": "667" },
                "p": { "x": "1103", "y": "667" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "74",
              "code_ascii": "J",
              "confidence": "57"
            },
            "tip": {
              "poly": {
                "p": { "x": "1176", "y": "638" },
                "p": { "x": "1185", "y": "637" },
                "p": { "x": "1184", "y": "661" },
                "p": { "x": "1175", "y": "662" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "52",
              "code_ascii": "4",
              "confidence": "7"
            }
          },
          "ncharacter": "8",
          "characters": {
            "characater": {
              "poly": {
                "p": { "x": "1094", "y": "643" },
                "p": { "x": "1099", "y": "643" },
                "p": { "x": "1099", "y": "667" },
                "p": { "x": "1094", "y": "667" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "49",
              "code_ascii": "1",
              "confidence": "97"
            },
            "characater": {
              "poly": {
                "p": { "x": "1103", "y": "642" },
                "p": { "x": "1113", "y": "642" },
                "p": { "x": "1112", "y": "667" },
                "p": { "x": "1102", "y": "667" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "53",
              "code_ascii": "5",
              "confidence": "89"
            },
            "characater": {
              "poly": {
                "p": { "x": "1112", "y": "640" },
                "p": { "x": "1122", "y": "640" },
                "p": { "x": "1122", "y": "666" },
                "p": { "x": "1112", "y": "666" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "52",
              "code_ascii": "4",
              "confidence": "97"
            },
            "characater": {
              "poly": {
                "p": { "x": "1123", "y": "640" },
                "p": { "x": "1132", "y": "640" },
                "p": { "x": "1131", "y": "665" },
                "p": { "x": "1123", "y": "665" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "53",
              "code_ascii": "5",
              "confidence": "97"
            },
            "characater": {
              "poly": {
                "p": { "x": "1134", "y": "640" },
                "p": { "x": "1139", "y": "640" },
                "p": { "x": "1139", "y": "664" },
                "p": { "x": "1133", "y": "664" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "49",
              "code_ascii": "1",
              "confidence": "77"
            },
            "characater": {
              "poly": {
                "p": { "x": "1154", "y": "639" },
                "p": { "x": "1163", "y": "639" },
                "p": { "x": "1163", "y": "663" },
                "p": { "x": "1153", "y": "663" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "66",
              "code_ascii": "B",
              "confidence": "97"
            },
            "characater": {
              "poly": {
                "p": { "x": "1164", "y": "638" },
                "p": { "x": "1173", "y": "638" },
                "p": { "x": "1173", "y": "663" },
                "p": { "x": "1163", "y": "663" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "66",
              "code_ascii": "B",
              "confidence": "94"
            },
            "characater": {
              "poly": {
                "p": { "x": "1191", "y": "637" },
                "p": { "x": "1206", "y": "636" },
                "p": { "x": "1205", "y": "660" },
                "p": { "x": "1190", "y": "661" }
              },
              "bkcolor": "16777215",
              "color": "0",
              "code": "76",
              "code_ascii": "L",
              "confidence": "34"
            }
          },
          "det_time_us": "1104009",
          "poly": {
            "p": { "x": "1088", "y": "642" },
            "p": { "x": "1210", "y": "634" },
            "p": { "x": "1210", "y": "661" },
            "p": { "x": "1087", "y": "669" }
          }
        }
      },
      "det_time_us": "1710270"
    }
  }
}

我有类似的东西:

$ jq -r '.frames.frame.lps.lp|.characters.characater.code_ascii,.characters.characater.confidence' test.json

但它只返回一个字母 & 它是 conf. 分数....

问题

  • 如何取回所有字母和相关分数?

输出

我希望输出如下:

1 97, 5 89, 4 97,5 97, 1 77,B 97, B 94, L 34, J, 57,J 57, 4 7, 1 97, 5 89, 4 97, 5 97, 1 77, B 97, B 94, L 34

注意:格式可以不同,这只是表示我要提取的数据。

复制粘贴

输入文件“test.json”

{"response":{"container":{"id":"41d6efcb-24d6-490d-8880-762255519b5f","timestamp":"2018-Jul-11 19:51:06.461665"},"id":"00000002-0000-0000-0000-000000000015"},"frames":{"frame":{"id":"5583","timestamp":"2016-Nov-30 13:05:27","lps":{"lp":{"licenseplate":"15451BBL","text":"15451BBL","wtext":"15451BBL","confidence":"20","bkcolor":"16777215","color":"16777215","type":"0","ntip":"11","cct_country_short":"","cct_state_short":"","tips":{"tip":{"poly":{"p":{"x":"1094","y":"643"},"p":{"x":"1099","y":"643"},"p":{"x":"1099","y":"667"},"p":{"x":"1094","y":"667"}},"bkcolor":"16777215","color":"0","code":"49","code_ascii":"1","confidence":"97"},"tip":{"poly":{"p":{"x":"1103","y":"642"},"p":{"x":"1113","y":"642"},"p":{"x":"1112","y":"667"},"p":{"x":"1102","y":"667"}},"bkcolor":"16777215","color":"0","code":"53","code_ascii":"5","confidence":"89"},"tip":{"poly":{"p":{"x":"1112","y":"640"},"p":{"x":"1122","y":"640"},"p":{"x":"1122","y":"666"},"p":{"x":"1112","y":"666"}},"bkcolor":"16777215","color":"0","code":"52","code_ascii":"4","confidence":"97"},"tip":{"poly":{"p":{"x":"1123","y":"640"},"p":{"x":"1132","y":"640"},"p":{"x":"1131","y":"665"},"p":{"x":"1123","y":"665"}},"bkcolor":"16777215","color":"0","code":"53","code_ascii":"5","confidence":"97"},"tip":{"poly":{"p":{"x":"1134","y":"640"},"p":{"x":"1139","y":"640"},"p":{"x":"1139","y":"664"},"p":{"x":"1133","y":"664"}},"bkcolor":"16777215","color":"0","code":"49","code_ascii":"1","confidence":"77"},"tip":{"poly":{"p":{"x":"1154","y":"639"},"p":{"x":"1163","y":"639"},"p":{"x":"1163","y":"663"},"p":{"x":"1153","y":"663"}},"bkcolor":"16777215","color":"0","code":"66","code_ascii":"B","confidence":"97"},"tip":{"poly":{"p":{"x":"1164","y":"638"},"p":{"x":"1173","y":"638"},"p":{"x":"1173","y":"663"},"p":{"x":"1163","y":"663"}},"bkcolor":"16777215","color":"0","code":"66","code_ascii":"B","confidence":"94"},"tip":{"poly":{"p":{"x":"1191","y":"637"},"p":{"x":"1206","y":"636"},"p":{"x":"1205","y":"660"},"p":{"x":"1190","y":"661"}},"bkcolor":"16777215","color":"0","code":"76","code_ascii":"L","confidence":"34"},"tip":{"poly":{"p":{"x":"1103","y":"655"},"p":{"x":"1111","y":"655"},"p":{"x":"1111","y":"667"},"p":{"x":"1103","y":"667"}},"bkcolor":"16777215","color":"0","code":"74","code_ascii":"J","confidence":"57"},"tip":{"poly":{"p":{"x":"1103","y":"655"},"p":{"x":"1111","y":"655"},"p":{"x":"1111","y":"667"},"p":{"x":"1103","y":"667"}},"bkcolor":"16777215","color":"0","code":"74","code_ascii":"J","confidence":"57"},"tip":{"poly":{"p":{"x":"1176","y":"638"},"p":{"x":"1185","y":"637"},"p":{"x":"1184","y":"661"},"p":{"x":"1175","y":"662"}},"bkcolor":"16777215","color":"0","code":"52","code_ascii":"4","confidence":"7"}},"ncharacter":"8","characters":{"characater":{"poly":{"p":{"x":"1094","y":"643"},"p":{"x":"1099","y":"643"},"p":{"x":"1099","y":"667"},"p":{"x":"1094","y":"667"}},"bkcolor":"16777215","color":"0","code":"49","code_ascii":"1","confidence":"97"},"characater":{"poly":{"p":{"x":"1103","y":"642"},"p":{"x":"1113","y":"642"},"p":{"x":"1112","y":"667"},"p":{"x":"1102","y":"667"}},"bkcolor":"16777215","color":"0","code":"53","code_ascii":"5","confidence":"89"},"characater":{"poly":{"p":{"x":"1112","y":"640"},"p":{"x":"1122","y":"640"},"p":{"x":"1122","y":"666"},"p":{"x":"1112","y":"666"}},"bkcolor":"16777215","color":"0","code":"52","code_ascii":"4","confidence":"97"},"characater":{"poly":{"p":{"x":"1123","y":"640"},"p":{"x":"1132","y":"640"},"p":{"x":"1131","y":"665"},"p":{"x":"1123","y":"665"}},"bkcolor":"16777215","color":"0","code":"53","code_ascii":"5","confidence":"97"},"characater":{"poly":{"p":{"x":"1134","y":"640"},"p":{"x":"1139","y":"640"},"p":{"x":"1139","y":"664"},"p":{"x":"1133","y":"664"}},"bkcolor":"16777215","color":"0","code":"49","code_ascii":"1","confidence":"77"},"characater":{"poly":{"p":{"x":"1154","y":"639"},"p":{"x":"1163","y":"639"},"p":{"x":"1163","y":"663"},"p":{"x":"1153","y":"663"}},"bkcolor":"16777215","color":"0","code":"66","code_ascii":"B","confidence":"97"},"characater":{"poly":{"p":{"x":"1164","y":"638"},"p":{"x":"1173","y":"638"},"p":{"x":"1173","y":"663"},"p":{"x":"1163","y":"663"}},"bkcolor":"16777215","color":"0","code":"66","code_ascii":"B","confidence":"94"},"characater":{"poly":{"p":{"x":"1191","y":"637"},"p":{"x":"1206","y":"636"},"p":{"x":"1205","y":"660"},"p":{"x":"1190","y":"661"}},"bkcolor":"16777215","color":"0","code":"76","code_ascii":"L","confidence":"34"}},"det_time_us":"1072592","poly":{"p":{"x":"1088","y":"642"},"p":{"x":"1210","y":"634"},"p":{"x":"1210","y":"661"},"p":{"x":"1087","y":"669"}}}},"det_time_us":"1720812"}}}

关联

输入文件:https ://drive.google.com/file/d/18wCzjMBpw7SIeVFByAGPQiqCBjg_0te3/view?usp=sharing

json data
  • 3 个回答
  • 867 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve