小编Int*_*man的帖子

批量重命名文件

我有一个充满图像的目录:

image0001.png
image0002.png
image0003.png
...
Run Code Online (Sandbox Code Playgroud)

我想要一个单线将它们重命名为(比如说)。

0001.png
0002.png
0003.png
...
Run Code Online (Sandbox Code Playgroud)

我该怎么做呢?

shell bash rename

181
推荐指数
7
解决办法
20万
查看次数

每周 cron 作业以保存已安装软件包的列表

我无法弄清楚如何设置我的第一个 cron 作业。我只想每周运行一次这个命令:

dpkg -l > ~/Dropbox/installed_packages
Run Code Online (Sandbox Code Playgroud)

我的/etc/crontab文件包含该行

7 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
Run Code Online (Sandbox Code Playgroud)

所以我需要将我的命令放在目录 /etc/cron.weekly 中的某个位置 - 但在哪个文件中?/etc/cron.weekly目前包含以下文件:

apt-xapian-index  man-db  0anacron  cvs
Run Code Online (Sandbox Code Playgroud)

cron

2
推荐指数
1
解决办法
604
查看次数

标签 统计

bash ×1

cron ×1

rename ×1

shell ×1