简体   繁体   中英

Symbolic Link disappears after restart

I'm running Mac OS X 10.8.4

I make the following symbolic link

ln -s /Users/AlyssaPHacker/mysql/mysql.sock /tmp/mysql.sock

But every time I restart the computer, the symbolic link disappears and I have to create it again. Does anyone know how to get around this?

The /tmp directory is emptied when the system boots so your link is lost.

You can use the special cron @reboot entry to run your command during each boot:

@reboot ln -s /Users/AlyssaPHacker/mysql/mysql.sock /tmp/mysql.sock

in the crontab file - see the man page

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM