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

dragos_kai's questions

Martin Hope
dragos_kai
Asked: 2019-06-04 10:19:52 +0800 CST

Bash 脚本没有按预期工作

  • 5

所以,就脚本而言,我是一个完全的新手,就像这是我的第一个。我创建了以下脚本:

# This simply declares which states we are using to create tarballs from
for blah in ar ky ms ny; 
do 
    # This will go into each tomcat-state directory and create a tarball in /home/ec-user for all files older than 90 days
    find /var/www/apps/tomcat-${blah}/logs -type f -mtime +90 | xargs tar -cvzf /home/ec2-user/archive-${blah}.tar.gz; 

    # This creates a master archive tarball containing all the archive-state.tar.gz files
    tar -cvzf /home/ec2-user/ebd-log-archives.tar.gz /home/ec2-user/archive-${blah}.tar;

    # Since in step one, we archives all files older than 90 days, this step removes them.
    # find /var/www/apps/tomcat-${blah}/logs -type f  -mtime +90 -exec rm {} \;

    # And since we have the master archive file, this removes the archive-state files
    rm /home/ec2-user/archive-${blah}.tar.gz;
done

我已经注释掉删除日志以进行测试。

问题是,当我得到 master tarball 时,里面只有 NY,或者我把哪个放在循环中的最后一个(我测试了这个以确保它不仅仅是一个奇怪的 NY 东西)

不确定发生了什么,我在该服务器上的措辞上针对与此类似的旧脚本进行了测试,并且该脚本运行良好。

编辑:感谢您的回复,我已将脚本更新为:

# This creates the master tarball we will be using
tar -cvzf /home/ec2-user/ebd-log-archives.tar.gz

# This simply declares which states we are using to create tarballs from
for blah in ar ky ms ny; 
do 
    # This will go into each tomcat-state directory and create a tarball in /home/ec-user for all files older than 90 days
    find /var/www/apps/tomcat-${blah}/logs -type f -mtime +90 | xargs tar -cvzf /home/ec2-user/archive-${blah}.tar.gz; 

    # This creates a master archive tarball containing all the archive-state.tar.gz files
    tar -rvzf /home/ec2-user/ebd-log-archives.tar.gz /home/ec2-user/archive-${blah}.tar;

    # Since in step one, we archives all files older than 90 days, this step removes them.
    # find /var/www/apps/tomcat-${blah}/logs -type f  -mtime +90 -exec rm {} \;

    # And since we have the master archive file, this removes the archive-state files
    rm /home/ec2-user/archive-${blah}.tar.gz;
done

我会尝试运行这个并发布更新

linux bash
  • 1 个回答
  • 50 Views
Martin Hope
dragos_kai
Asked: 2019-04-17 13:16:12 +0800 CST

设置 nginx RTMP 服务器。除了 Facebook Live,我一切正常

  • 2

大家好,我正在尝试使用https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-中的说明设置新的 RTMP 服务器nginx.50/并且我遇到了 Facebook Live 的问题。我有一种感觉,这归结为他们新的只接受 SSL 连接

弃用 对 RTMP 服务器 URL 的支持将被弃用,从 5 月 1 日起将不再支持非安全 URL。请确认您的编码器支持 RTMPS,并更新编码器设置以插入新的安全服务器 URL 以便继续。

所以我遇到了我尝试停止并启动 nginx 的问题,并将其作为配置的底部:

rtmp {  
        server {
                listen 1935;
                listen 443;
                chunk_size 4096;

                application live {
                        live on;
                        record off;
                        push 'rtmps://live-api-s.facebook.com:443/rtmp/insertedmykeyhere';

                }
        }
}

我正进入(状态:

root@localhost:/usr/local/nginx/conf# sudo /usr/local/nginx/sbin/nginx -s stop nginx: [emerg] 无效端口在 url "rtmps://live-api-s.facebook.com :443/rtmp/218

我不能用它做任何其他事情。当我评论 facebook 时,我可以毫无问题地流式传输到 Twitch、Mixer、YouTube 等,但这阻碍了我。

linux nginx streaming
  • 1 个回答
  • 3904 Views

Sidebar

Stats

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

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve