[英]How to write to a text file on a USB flash drive on boot linux?
I want to create a text file in a USB flash drive and write to it from a python script . 我想在USB闪存驱动器中创建一个文本文件,然后从python脚本写入该文件。 this has happen everytime on autostart (crontab) too.
每次自动启动(crontab)时也会发生这种情况。 Can anyone tell me how to this?
谁能告诉我该怎么做?
Well, you sure don't want to use crontab -- that will run on a time-wise schedule. 好吧,您确定不想使用crontab -它将按时间计划运行。
You probably would have a better time appending your write-script logic (or an execution of your write-script) to the rc.local
script in /etc
(actually, I forget if it's in /etc
or /etc/rc.d
on rasperian... 您可能会有更好的时间将写脚本逻辑(或写脚本的执行)附加到
/etc
的rc.local
脚本中(实际上,我忘记了它是在/etc
或/etc/rc.d
中) rasperian ...
Oh look! 哦,看! Rasperrypi.org has a link to do just that!
Rasperrypi.org上有一个链接可以做到这一点! How convieeeeeenient!
多么美味!
http://www.raspberrypi.org/documentation/linux/usage/rc-local.md http://www.raspberrypi.org/documentation/linux/usage/rc-local.md
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.