小编Lev*_*der的帖子

如何在整个文件系统中搜索文本?

假设应该使用 grep 工具,我想在整个文件系统中搜索文本字符串“800x600”。

我试过:

grep -r 800x600 /
Run Code Online (Sandbox Code Playgroud)

但它不起作用。

我相信我的命令应该做的是递归地遍历 root 下的所有文件/文件夹以获取文本“800x600”并列出搜索结果。

我究竟做错了什么?

grep recursive

65
推荐指数
2
解决办法
14万
查看次数

cron 午夜 00 24 或 00 00?

我当前的 crontab 看起来像这样:

00 00 * * 1-5 "/home/user/script.sh"
Run Code Online (Sandbox Code Playgroud)

但它似乎没有被触发。除了在午夜运行的那个之外,所有其他人都触发良好。

午夜的正确格式是什么?00 00或者00 24

cron

15
推荐指数
1
解决办法
5万
查看次数

如何在 etc/apt/sources.list 中添加 Debian Universe?

在 /etc/apt/sources.list

我添加universe

deb http://http.debian.net/debian wheezy main contrib non-free universe

当我做aptitude update日志时抱怨:

W: Failed to fetch http://http.debian.net/debian/dists/wheezy/Release:
Unable to find expected entry 'universe/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
Run Code Online (Sandbox Code Playgroud)

我应该关心错误吗?我是否正确添加了 Debian Universe?

debian apt

13
推荐指数
1
解决办法
3万
查看次数

VNC 服务器:远程 VNC 客户端连接时禁用本地屏幕

有一个 Linux 桌面/服务器位于位置 b

我驻扎在location-a并使用 VNC 客户端连接到location-b

为防止其他人观看我的桌面操作,当我的 VNC 客户端连接时,如何禁用/清除位置 b处的远程桌面?

linux vnc

6
推荐指数
1
解决办法
1万
查看次数

如何以普通用户身份运行reboot而无需输入密码?

我的目标是在不输入密码的情况下使用 reboot 作为我的用户名。我怎样才能做到这一点?

我已经阅读了允许用户在没有密码的情况下使用 sudo并遵循了建议,但它仍然对我不起作用。这是我的,/etc/sudoers但它仍然要求输入密码:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
myusername …
Run Code Online (Sandbox Code Playgroud)

debian sudo

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

debian ×2

apt ×1

cron ×1

grep ×1

linux ×1

recursive ×1

sudo ×1

vnc ×1