Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在完成另一个命令后在 Linux 中运行一个命令(不使用睡眠)。示例:我在 3 天后运行打印文件内容的命令,所以我希望在 3 天后文件完全打印后运行我的其他命令。
如果您想成功完成第一个命令,那么已经向您提到了一种方法,然后只执行第二个命令,然后您可以使用 & 。例如 - cmd1 && cmd2 。如果还有其他需要,添加更多上下文会更好。