search

Home  >  Q&A  >  body text

bash - linux time 命令,为什么一定要指定绝对路径,

比如 { time mysqldump > bak.sql; } 2> t.txt

mysqldump 一定要写绝对路径, 否则,bak.sql是空的。

仅有的幸福仅有的幸福2775 days ago821

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-24 16:01:12

    It seems that your environment variables are wrong. Use env | grep PATH to check whether the paths corresponding to time mysqldump and other commands are in your PATH

    reply
    0
  • 滿天的星座

    滿天的星座2017-04-24 16:01:12

    Do you need an absolute path to run mysqldump normally?

    reply
    0
  • Cancelreply