linux - Very psychedelic No such file or directory, please give me a scientific explanation
某草草
某草草 2017-06-12 09:24:27
0
1
918

To upgrade OpenResty, rename the sbin/nginx file,

Then the psychedelic scene:

root@ubuntu-2gb-sgp1-01-1497159849981-2gb-sgp1-01:~/src/openresty-1.11.2.2# mv /usr/local/openresty/nginx/sbin/nginx{,`date +%m%d`}
-bash: mv /usr/local/openresty/nginx/sbin/nginx: No such file or directory

However, both /usr/local/openresty/nginx/sbin/ and nginx exist,

root@ubuntu-2gb-sgp1-01-1497159849981-2gb-sgp1-01:/usr/local/openresty/nginx/sbin# ls
nginx

If you rename it in the directory,

cd /usr/local/openresty/nginx/sbin
mv nginx{,`date +%m%d`}
ls
nginx0611

Please tell me scientists why~

By the way, OpenResty cannot simply copy the sbin/nginx file after make, otherwise luajit and other files will not be updated

某草草
某草草

reply all(1)
伊谢尔伦

Finally it was found that it was a space problem, the code below is correct

mv /usr/local/openresty/nginx/sbin/nginx{,`date +%m%d`}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!