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

user374987's questions

Martin Hope
user374987
Asked: 2017-01-19 05:19:11 +0800 CST

查找/重命名命令没有捕获我希望它找到的文件名

  • 2

我的主目录中有这两个文件 -

hello_newest.txt
goodbye_newest.txt

我想重命名它们,以便完全删除文件名的“最新”部分,以便它们重新出现hello.txt并goodbye.txt

这是我正在运行的命令 -

find -name "*.txt" -exec rename 's/newest//i' {} ";"

运行此命令后,它不会引发错误或对文件执行任何操作。我已经检查了http://www.computerhope.com/unix/rename.htm并且看起来它应该基于那里的一些示例工作。

我确定这很简单,但是我错过了什么?

linux bash rename
  • 2 个回答
  • 92 Views
Martin Hope
user374987
Asked: 2016-09-24 14:08:02 +0800 CST

让 httpd fullstatus 在 Apache 2.4 上的网络服务器上工作的问题

  • 1

我有一个网络服务器,我正在将它迁移到 RHEL7 (httpd 2.2 -> 2.4)。在我们的旧服务器(2.2)中,我们可以做一个 httpd fullstatus,它会显示很多关于服务器上 apache 的好信息。

在 apache 2.4 服务器上,我无法让 fullstatus 命令正常工作。这是我采取的步骤列表(根据互联网上的各种指南编译) -

1.) - 检查 status_module 是否启用。 httpd -M | grep status返回status_module (shared)。

2.) - 将模块添加到 httpd.conf -

<IfModule mod_status.c>
    <Location "/server-status">
        SetHandler server-status
        Require host <my hostname>
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1

    </Location>
</IfModule>

3.) - 在 conf.modules.d/ 中创建了一个 conf 文件(与上面的词相同) -

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

在完成所有这些事情后,我重新加载/重新启动了 apache,但我仍然没有运气让 httpd fullstatus 正常工作。

注意-我也没有运气单独完成这两个步骤,这就是为什么我将它们放在一起并希望它会起作用。

你们对我下一步应该做什么有什么想法吗?

谢谢。

编辑 - 这是我尝试运行 httpd fullstatus 时的当前输出 -

[username@hostname]# httpd fullstatus
    Usage: httpd [-D name] [-d directory] [-f file]
             [-C "directive"] [-c "directive"]
             [-k start|restart|graceful|graceful-stop|stop]
             [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]

EDIT2 - 运行 apachectl fullstatus 时,出现权限被拒绝错误 -

                               Forbidden

 You don't have permission to access /server-status on this server.
linux apache-2.2 web-server apache-2.4
  • 1 个回答
  • 2853 Views
Martin Hope
user374987
Asked: 2016-09-10 07:13:06 +0800 CST

tar -N 命令无法正确过滤日期的问题

  • 1

我有这个 tar 命令我正在尝试运行 -

tar -N '2016-01-01' -jcvf archive.tar.bz2 /home/myhome

在主目录中,我有以下应该过滤的文件

-rwx------.  1   1000   1000    89097 Dec  3  2011 automysqlbackup
-rw-------.  1   1000   1000    11858 Nov 21  2011 automysqlbackup.conf

但是,当我查看命令输出时,它们仍然存在 -

tar: Option --after-date: Treating date `2016-01-01' as 2016-01-01 00:00:00
tar: Removing leading `/' from member names
...
/home/bamboo/automysqlbackup
/home/bamboo/automysqlbackup.conf
...

为什么它不能按日期正确过滤这些文件?

谢谢。

linux tar
  • 1 个回答
  • 760 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve