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-477026

qwr's questions

Martin Hope
qwr
Asked: 2023-05-07 05:53:08 +0800 CST

gedit 支持什么正则表达式风格?

  • 5

在 Ubuntu 20.04 上,我的 gedit 3.36.2 版本带有一个用于查找和替换的正则表达式复选框,无需安装任何插件即可开箱即用。使用哪种正则表达式风格?

gedit
  • 1 个回答
  • 34 Views
Martin Hope
qwr
Asked: 2020-03-08 15:32:07 +0800 CST

将二进制文件安装到另一个目录后,错误“没有这样的文件或目录”

  • 2

在使用 apt 卸载程序并将其重新安装到另一个位置(例如,使用 snap 的 pypy)后,从命令行报告运行程序bash: /usr/bin/pypy: No such file or directory,但which pypy正确地给出了/snap/bin/pypy. 如何让 shell 识别新的安装位置?

command-line bash apt paths snap
  • 1 个回答
  • 303 Views
Martin Hope
qwr
Asked: 2019-10-27 20:37:50 +0800 CST

我应该在 mkusb 中使用 grub4win.img.xz 吗?

  • 1

我正在使用 mkusb 创建启动盘(USB 驱动器)。mkusb 给了我一个使用 grub4win.img.xz 的选项:

dus-live 12.2.8 cannot install 'grub-pc' in installed systems in UEFI mode.
'grub-pc' is used to make persistent live drives bootable in BIOS mode.

Instead you can use 'grub4win.img.xz', an image with the grub content.

 Minimum 8 GB: You need a drive (USB pendrive or memory card) with
at least 8 GB because the image is expanded to 7.744 GB (to allow for
undersized 8 GB drives).
 Do you want to use 'grub4win.img.xz'? (y/N)

完成后:

Cannot install grub for BIOS mode from an installed system in UEFI mode.
 The created system should work in UEFI mode, 
if the ISO file is made for UEFI mode (Windows 8-10 64-bit).
If you use 'grub4win.img.xz', it should work in BIOS mode too.

我的系统已经在 UEFI 中禁用了安全启动。那我需要这个吗?

grub2 dual-boot uefi grub-efi mkusb
  • 1 个回答
  • 531 Views
Martin Hope
qwr
Asked: 2019-05-08 00:19:28 +0800 CST

GNOME 文件如何实现复制对话框?

  • 1

对于简单的任务,我使用 GNOME 文件 (Nautilus) 来复制文件而不是 rsync。我尝试挖掘我不熟悉的源nautilus-file-operations.ccp ,并且我假设它使用自己的自定义实现(不是)进行错误处理和report_copy_progress?我不知道实际的系统调用发生在哪里。

gnome nautilus
  • 1 个回答
  • 119 Views
Martin Hope
qwr
Asked: 2018-09-24 16:13:51 +0800 CST

配置错误第 38 行:排序:没有这样的文件或目录

  • 0

使用configure, 以以下消息结尾:

./configure: line 38: sort: No such file or directory
./configure: line 35: sed: No such file or directory
software-installation paths configure
  • 2 个回答
  • 1023 Views
Martin Hope
qwr
Asked: 2018-08-14 11:47:55 +0800 CST

从映像中恢复 NTFS 文件系统

  • 1

我有一个 WD Passport 1TB 外置硬盘驱动器,ddrescue 在驱动器完全停止读取之前设法保存了 95%。

ddrescueview

恢复的数据存储为recovery.img.

$ mmls recovery.img 
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors

      Slot      Start        End          Length       Description
000:  Meta      0000000000   0000000000   0000000001   Primary Table (#0)
001:  -------   0000000000   0000002047   0000002048   Unallocated
002:  000:000   0000002048   1953458175   1953456128   NTFS / exFAT (0x07)

但是我无法将图像挂载为 NTFS:

$ sudo mount -t ntfs recovery.img /mnt
NTFS signature is missing.
Failed to mount '/dev/loop11': Invalid argument
The device '/dev/loop11' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

$ sudo ntfsfix recovery.img
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.

chkdsk recovery.img在我的 Windows 机器上说文件名无效。

我还尝试使用Ubuntu DataRecovery 文档中描述的偏移量(2048 * 512):

$ sudo mount -t ntfs -o loop,force,offset=1048576 recovery.img /mnt
Failed to read last sector (1953456126): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/loop11': Invalid argument
The device '/dev/loop11' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

testdisk[ List ]文件确实有效,所以我会尝试从那里复制。但如果可能的话,我想安装。

关于我现在应该尝试什么的任何想法?

编辑:kpartx 的结果,使用此处列出的说明:

$ sudo kpartx -l recovery.img
loop11p1 : 0 1953456128 /dev/loop11 2048
$ sudo kpartx -a recovery.img
device-mapper: resume ioctl on loop11p1  failed: Invalid argument
create/reload failed on loop11p1
mount disk-image ntfs hard-drive ddrescue
  • 1 个回答
  • 3178 Views
Martin Hope
qwr
Asked: 2018-05-13 12:35:31 +0800 CST

youtube-dl 在视频标题中保留斜线

  • 0

如果视频标题为“5/12”,则使用%(title)s会生成“5_12”。有没有办法在文件名中保留特殊字符?我会接受像“5%2F12”这样的东西。

或者,如果有一种快速方法可以只从播放列表中下载视频名称-e(或者-j似乎一次只下载一个视频),我也会接受。

--get-title一次为播放列表制作一个视频。事实上,在使用--download-archive的时候,所有的名字都被打印出来了,尽管有额外的文字。

filename youtube-dl
  • 1 个回答
  • 1111 Views
Martin Hope
qwr
Asked: 2018-05-04 10:05:22 +0800 CST

移动 GNOME 文件对话框按钮

  • 17

我最近升级到 18.04,让我有点恼火的是“取消”和“打开”/“选择”按钮现在位于顶部栏。有什么办法可以将它们移到底部,就像在 Unity 中一样?

在此处输入图像描述

为了比较:

在此处输入图像描述

gnome gui gtk3
  • 1 个回答
  • 1886 Views
Martin Hope
qwr
Asked: 2017-10-08 15:33:39 +0800 CST

ARToolKit5 相机无法识别

  • 0

Cheese 识别出我的网络摄像头。输出v4l2-ctl --list-devices:

HD WebCam (usb-0000:00:14.0-7):
    /dev/video0

但是,ARToolKit5 无法识别相机并输出 SMPTE 彩条。不确定这是 GStreamer 还是 ARToolKit 的东西。输出:

$ sudo ./simpleTest
Using video configuration ''.
Using default video config.
libARvideo: GStreamer 0.10.36
libARvideo: GStreamer pipeline is READY!
libARvideo: GStreamer negotiated 320x240@30.000fps
libARvideo: allocating 230400 bytes
libARvideo: GStreamer pipeline is PAUSED.
Image size (x,y) = (320,240)
*** Camera Parameter ***
--------------------------------------
SIZE = 320, 240
Distortion factor: k1=0.1147807688, k2=-0.5208189487, p1=-0.0002069871, p2=-0.0040593124
                  fx=337.085815, fy=316.949043, x0=159.148895, y0=118.950233, s=0.993923
339.14696 0.00000 159.14890 0.00000 
0.00000 318.88706 118.95023 0.00000 
0.00000 0.00000 1.00000 0.00000 
--------------------------------------

我已经尝试在 env 变量中使用这些字符串ARTOOLKIT5_VCONF: -device=LinuxV4L, -device=GStreamer, -device=Linux1394Cam. 关于如何让相机被识别的任何帮助?

webcam
  • 1 个回答
  • 213 Views
Martin Hope
qwr
Asked: 2017-03-30 19:49:00 +0800 CST

SD 卡 I/O 错误

  • 2

运行fsck.fat /dev/block/mmcblk0p1,我的故障 SD 卡的设备,我得到这个:

fsck.fat 3.0.28 (2015-05-16)
Read 512 bytes at 0:Input/output error

这是否意味着文件永久不可读?

运行fsck返回以下内容:

e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/mmcblk0p1
Could this be a zero-length partition?

ddrescue无法保存任何东西。输出df:

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4002028        0   4002028   0% /dev
tmpfs             805008     9496    795512   2% /run
/dev/sda5      176456296 55779936 111689840  34% /
tmpfs            4025024   598760   3426264  15% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs            4025024        0   4025024   0% /sys/fs/cgroup
/dev/sda1          98304    51376     46928  53% /boot/efi
tmpfs             805008       92    804916   1% /run/user/1000
/dev/mmcblk0p1  15343104 13967392   1375712  92% /media/qwr/9016-4EF8

更新:情况变得奇怪了。在我的 Windows 机器上,似乎整个 SD 卡都是可读的。但是,复制文件非常慢,偶尔会恢复到正常传输速度。我设法复制了我主要追求的文件(我上次备份后拍摄的照片),但在某个时间点之后,无论我等待多长时间,Windows Explorer 都不会继续复制。

我回到 Ubuntu,令我惊讶的是,fsck.fat实际上运行成功了。运行它几次会给出以下组合:Has a large number of bad entries. (128/133), Free cluster summary wrong (42991 vs. really 43267), Orphaned long file name part, Contains a free cluster (144584). Assuming EOF.,Start does point to root directory. Deleting dir. ddrescue现在运行良好,所以我暂时让它继续运行。

奇怪的是,它看起来像是休眠和非休眠,或者暂停和恢复,等待可能会让 Ubuntuddrescue拯救相当多的东西。

sd-card
  • 1 个回答
  • 7491 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve