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

An Ignorant Wanderer's questions

Martin Hope
An Ignorant Wanderer
Asked: 2021-08-08 09:39:47 +0800 CST

尝试安装 CUDA 驱动程序,“致命错误:asm/kmap_types.h:没有这样的文件或目录”

  • 0

我的机器上安装了 CUDA 驱动程序(Ubuntu 20.04)。它正在工作......直到它停止工作(不确定发生了什么)。所以我试图通过运行重新安装它:

sudo sh cuda_11.1.0_455.23.05_linux.run

我cuda_11.1.0_455.23.05_linux.run从 NVIDIA 的网站下载的。但是,我收到一条错误消息,说要查看/var/log/nvidia-installer.log以了解有关安装失败原因的更多信息。该文件包含一个非常大的错误消息,我在下面粘贴了其中的一部分。我不太确定该怎么做

In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-frontend.c:13:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv.c:14:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-frontend.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-dma.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-vm.o
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-vtophys.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-acpi.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-dma.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-interface.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-p2p.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-acpi.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-mmap.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-mlock.o
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-p2p.o] Error 1
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-mmap.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-pci.o
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-registry.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pat.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pat.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-cray.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-usermap.o
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-cray.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-modeset-interface.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-usermap.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-usermap.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-procfs.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pci-table.o
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-procfs.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-kthread-q.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-pci.h:15,
                    from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pci.c:12:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pci.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-memdbg.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-i2c.c:17:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.


drivers
  • 1 个回答
  • 3291 Views
Martin Hope
An Ignorant Wanderer
Asked: 2021-06-01 01:24:25 +0800 CST

在 Ubuntu 20.04 上安装 R 4.0.2

  • 0

我正在尝试通过以下方式在 Ubuntu 20.04 上安装 R 版本 4.0.2: sudo apt-get install r-base=4.0.2但我得到了

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '4.0.2' for 'r-base' was not found

虽然它确实存在。

然后我尝试按照此处的说明进行操作,其中详细说明了安装最新版本 R 的说明:

# update indices
apt update -qq
# install two helper packages we need
apt install --no-install-recommends software-properties-common dirmngr
# import the signing key (by Michael Rutter) for these repo
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

然后:

apt install --no-install-recommends r-base

对于最后一步,我尝试 r-base=4.0.2 代替,因为我不想要最新版本,但我再次遇到同样的问题

编辑:根据 Henning 的回答,我跑了apt policy r-base,这给了我:

r-base:
  Installed: (none)
  Candidate: 4.1.0-1.2004.0
  Version table:
     4.1.0-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     4.0.5-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     4.0.4-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     4.0.3-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     4.0.2-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     4.0.1-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     4.0.0-1.2004.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
     3.6.3-2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages

所以我然后尝试sudo apt-get install r-base=4.0.2-1.2004.0了它给了我:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-base : Depends: r-recommended (= 4.0.2-1.2004.0) but 4.1.0-1.2004.0 is to be installed
E: Unable to correct problems, you have held broken packages.

我尝试安装r-recommended但我仍然遇到同样的问题

apt
  • 1 个回答
  • 1822 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-20 13:49:19 +0800 CST

使用 tee 时等待上一个命令完成

  • 1

我使用tee如下:

some commands | tee -a >(command1 >> file) >(command2 >> file) >(command3 >> file)

如何将 command2 的执行延迟到 command1 结束,对于 command3 和 command2 也是如此?我试过wait这样使用,但没有用:

some commands | tee -a >(command1 >> file) >(wait command2 >> file) >(wait command3 >> file)
command-line tee
  • 1 个回答
  • 455 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-15 13:03:55 +0800 CST

从 xargs 获取所有衍生进程的进程 ID

  • 1

在我的脚本中,我有以下内容: cat list | xargs -P6 -n2 ./first_queue &wherelist只是一个包含我要处理的单词对的文件:

单词1 单词2

字3字4

ETC...

first_queue只是另一个脚本。我试图在调用它之后立即获取由此 xargs 生成的所有 6 个进程的 pid,以便以后可以终止它们。我读到它$!给出了在后台运行的最后一个进程的 pid。但是,我想要所有 6 个。我怎样才能得到它们?

更多细节:

我编写了以下小脚本来测试@xenoid 的建议:

cat list | xargs -P6 -n2 ./first_queue &
id=$(echo $!)
echo $id
ids=$(pgrep -P $id)
echo $ids
ps aux | grep $id
for x in $ids; do
    echo $x
    ps aux | grep $x
    kill $x
done
kill $id
ps aux | grep $id
for x in $ids; do
    ps aux | grep $x
done

这是非常简化的(对于给我带来麻烦的命令,尽管在父进程(即 xargs 以及子进程)上first_queue运行,但它仍在运行):kill

srr=$1
bioproject=$2

prefetch $srr -O download_dir/$bioproject

prefetch只需从在线数据库下载数据。

bash process
  • 1 个回答
  • 825 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-14 19:25:59 +0800 CST

是否可以在磁盘空间低于某个阈值时下载文件?

  • 0

是否可以在 bash 脚本中的磁盘空间低于某个阈值时下载文件?我之所以问,是因为我正在从在线数据库下载文件,并且想继续下载,直到我的存储空间超过预先确定的阈值。一旦发生这种情况,我想停止下载(即终止命令),删除一些文件,然后重新开始下载(即重新运行下载文件的命令)。根据我的理解,您不能在 bash 中“暂停”命令,在我的情况下,只需停止下载过程并再次执行就可以了。

scripts bash hard-drive
  • 1 个回答
  • 38 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-09 16:53:12 +0800 CST

使用 sed sed -n '1,2p;3q' 和 sed -n '1,2p;2q' 有什么区别

  • 0

sed -n '1,2p;3q'和有什么区别吗sed -n '1,2p;2q'

我有一个包含 3 行的文件:

#comment 1
#comment 2
#comment 3

而且我没有注意到任何区别。两者都只打印了前两行

sed
  • 1 个回答
  • 131 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-08 15:41:08 +0800 CST

egrep中的连字符[重复]

  • 1
这个问题在这里已经有了答案:
如何使用 grep 搜索以连字符 (-) 开头的模式? (3 个回答)
2年前关闭。

我在 bash 中运行以下命令:

echo "#fastq-dump SRR3105676 --gzip -O my &" | egrep "-O"

我得到

grep: invalid option -- 'O'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.

我知道要解决此问题,我需要转义引号中的连字符(破折号),但为什么会发生这种情况?为什么 shell 将“-O”解释为选项而不是正则表达式?

command-line bash grep
  • 1 个回答
  • 210 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-08 14:11:24 +0800 CST

如何批量运行命令?

  • 1

我有以下脚本:

command file1 &
command file2 &
command file3 &
command file4 &
command file5 &
command file6 &
# SOME OTHER COMMAND 
command file7 &
command file8 &
command file9 &
command file10 &
command file11 &
command file12 &

在“其他命令”的位置,我想要一个命令来停止执行下一个命令,直到它之前的所有进程都完成,以便我有效地“批量”运行命令。我怎样才能做到这一点?

bash process
  • 3 个回答
  • 1556 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-07-07 13:53:50 +0800 CST

尝试使用 sed 在每行文件的末尾添加一个 & 符号

  • 1

我正在尝试在文件的每一行末尾添加一个&符号,sed如下所示:

sed -i -e 's/$/ &/' file

但是,当我查看文件的内容时(同时使用 Vim 和仅cating 文件),我看不到 & 符号(只有一个额外的空间)。我尝试使用另一个字符'l'并且它有效。为什么它不适用于&符号?

command-line sed
  • 1 个回答
  • 724 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-06-17 09:41:36 +0800 CST

硬盘空间不足,因为压缩速度不够快

  • 2

我正在将具有大量数据(fastq 文件)的文件(并行)下载到一个目录中。我很快就没有空间了。所以我得到了以下脚本(从这里,稍作修改)在下载文件时压缩文件:

inotifywait -m ./ -e create -e moved_to |
    while read dir action filepath; do
        echo "The file '$filepath' appeared in directory '$dir' via '$action'"
        # compress file
        if [[ "$filepath" =~ .*fastq$ ]]; then
            pigz --best $filepath
        fi
    done

这有助于我稍后用完硬盘空间,但我下载文件的速度仍然比压缩速度快。有没有办法并行化压缩过程,以便我同时压缩多个文件?(我假设上面的代码没有这样做)

我能想到(也许)实现这一点的一种方法是多次从不同的终端运行脚本,但我很确定这是一种非常糟糕的方法

compression hard-drive
  • 1 个回答
  • 237 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-06-06 07:06:22 +0800 CST

无法安装 nohup 命令

  • 4

我正在尝试安装nohup命令。当我跑步时,sudo apt-get install nohup我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package nohup

这里有什么问题?

package-management nohup
  • 1 个回答
  • 14669 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-05-02 14:09:23 +0800 CST

尝试修改 /proc/sys/vm/overcommit_memory,但即使使用 sudo 也无法获得权限

  • 2

我正在尝试编辑该文件/proc/sys/vm/overcommit_memory,但即使我使用sudo或切换到 root 用户sudo -i并尝试使用该帐户进行编辑,我的权限也会被拒绝。我怎样才能让它工作?

permissions sudo ram
  • 2 个回答
  • 7029 Views
Martin Hope
An Ignorant Wanderer
Asked: 2020-01-15 20:29:28 +0800 CST

如何将 wc 命令的结果通过管道传输到算术扩展中?

  • 4

我想wc -l在算术扩展中运行并使用结​​果。换句话说,我想做这样的事情:

wc -l (now somehow pipe/pass the result of this to) $((2 + result of wc command))

我怎样才能做到这一点?

语境

在我的~/Pictures目录中,我有多个名为“ Screenshot from YYYY-MM-DD hh-mm-ss.png”的文件以及其他文件。我想保留所有不是屏幕截图的文件,并且只保留指定数量的屏幕截图图片,具体取决于它们的最近时间。我想基本上只保留我最近的 3 个屏幕截图,并删除所有其余的。

所以这是我到目前为止所拥有的:

ls | grep "Screenshot *" | sort -r | wc -l

然后我想做的是从 中减去 3 wc -l,然后我可以使用它tail来列出所有不是前 3 个的文件,然后删除它们。

command-line wc
  • 2 个回答
  • 2130 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-12-21 11:03:39 +0800 CST

严重的文件名事故

  • 0

在 William Shott 的The Linux Command Line中,Shotts 指出 Linux 的一个缺陷是文件名,因为它们几乎可以是任何东西。-rf ~因此,如果他们愿意,可以命名一个文件。rm然后他说要考虑如果在该文件上运行会发生什么。所以我猜它会删除用户主目录中的所有文件。但我想这意味着 bash 无法区分选项和文件名?这对我来说似乎很奇怪。

command-line bash
  • 1 个回答
  • 71 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-12-19 16:42:05 +0800 CST

烦人的广告

  • 3

我使用 youtube 到 mp3 转换器之一下载了音乐,我认为他们用一些广告软件感染了我的机器。我每隔 30 分钟到 1 小时左右就会在屏幕顶部弹出一个窗口。我怎样才能弄清楚是什么原因造成的并解决它?

PS:我有 Ubuntu 19.04。另外,我尝试删除歌曲文件,但没有帮助。我使用https://ytmp3.cc/en1/(Youtube到 MP3 转换器)下载了这首歌

security
  • 1 个回答
  • 383 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-08-25 03:12:13 +0800 CST

tar 使用短格式选项与旧样式

  • 4

在 GNU 手册中tar,有以下示例表明选项的顺序很重要:

tar -cfv collection.tar blues folk jazz

在这种情况下,因为v放在 之后f,那么 tar 存档将被命名为“v”,并且如果它存在于当前目录中,tar将尝试添加到存档中。collection.tar但是,如果我从一开始就省略了-,那么该命令会按照我们的意愿工作,尽管它v被放置在f. 为什么?

command-line tar
  • 2 个回答
  • 191 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-08-22 02:15:40 +0800 CST

对 grep 和 * 通配符感到困惑

  • 5

我正在运行以下命令以查找与“flash_drive_data”无关的所有文件/目录:

find . -not -path './flash_drive_data*' | grep "./*flash*"

我尝试过的一些事情让我感到困惑:

1. 当我运行上述命令时,我得到了一些“部分”命中(即它们与模式不完全匹配*flash*。例如:

./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask
./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/cli.pyi
./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/signals.pyi
./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/templating.pyi
./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/sessions.pyi
./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/json
./.local/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/json/tag.pyi

最后3/flas突出显示。

2. 当我grep "*flash*"用 just替换时grep "*",我希望得到 find 返回的所有文件,但我没有得到。为什么?然后,当我这样做时,grep "**"我相信我得到了所有文件(或者至少我认为我做到了)。再说一遍,这是为什么呢?

3. 最后,我上面所做的目的是确保在运行时find . -not -path './flash_drive_data*'我没有得到任何与 flash_drive_data 相关的信息。好像我做到了(正如我上面解释的那样,grep 出现了一些意想不到的行为)。但是,当我运行时: find . -not -path './flash_drive_data*' -exec tar cfv home.tar.bz '{}' +

我得到的输出包括:

./flash_drive_data/index2/ask-sdk-core/dist/dispatcher/error/handler/

所以 flash_drive_data 文件被包括在内。

command-line grep find
  • 2 个回答
  • 2643 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-08-20 02:08:49 +0800 CST

使用“not”运算符与 find 不按预期工作

  • 0

我有一个目录“X”和一个名为“lib”的子目录,以及其他文件和目录。这个“lib”子目录本身又包含一堆目录和文件。我试图用来find获取目录 X 中所有内容的路径名,除了与“lib”有关的任何内容。

所以,我试着这样做: find -not -name "lib*"

这将从输出中排除路径./lib,但将包括 lib 目录本身中的所有内容,即lib/*. 我也试过:

find -not -name "lib/*"

但这给了我同样的结果

PS:我也试过find -not -name lib*了,结果还是一样

command-line find
  • 1 个回答
  • 1397 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-08-06 03:31:11 +0800 CST

sudo 重启后的 Ubuntu 19.04 登录循环

  • 0

我在安装了 Ubuntu 19.04 的机器上尝试了该sudo reboot命令,但我陷入了登录循环。一个常见的建议是修改 .Xauthority 文件,但我什至没有。我没有找到任何特定于sudo reboot. 我应该尝试做什么?

我尝试在恢复模式下启动 Ubuntu 19.04 一次,并在答案末尾按照步骤 1-4 进行操作,但没有这样做。

我还检查了我的主目录中是否有足够的磁盘空间,我有(73% 可用)

另外,我的系统上有两个用户,问题与这两个用户有关。

login reboot 19.04
  • 1 个回答
  • 138 Views
Martin Hope
An Ignorant Wanderer
Asked: 2019-07-30 08:54:55 +0800 CST

我在群组所有权方面遇到问题

  • 0

我正在关注The Linux Command Line: A Complete Introduction by William Shotts 中的一个组所有权示例,但我无法复制它。

示例如下:我创建了一个名为 test_group 的组,我使用useradd. 我仔细检查了两个用户是否都使用id user_name.

接下来,我在/usr/local/share名为 music 的目录中创建了一个目录。然后我做了以下事情:

sudo chown :test_group /usr/local/share/music
sudo chmod 775 /usr/local/share/music

现在运行ls -ld /usr/local/share/music给出:

drwxrwxr-x 2 root test_group 4096 Jul 29 12:23 .

Shotts 然后继续运行以下命令: > /usr/local/share/music/test_file 这对我不起作用,尽管我们有几乎完全相同的设置。即使我登录的用户是 test_group 组的一部分,我的权限也被拒绝。那么究竟出了什么问题呢?

permissions
  • 1 个回答
  • 113 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