우분투, 블루투스를 통해 파일 보내기

우분투, 블루투스를 통해 파일 보내기

read.txt다음 명령을 사용하여 이름이 지정된 파일을 보내고 싶습니다 bluetooth-sendto. 터미널에서 직접 명령을 사용하여 작동합니다 bluetooth-sendto --device=MACADDR path/to/read.txt. 다음 cron 작업으로 실행하고 싶습니다.

*/1 * * * * bluetooth-sendto --device=MACADDR path/to/read.txt

하지만 작동하지 않습니다. 이 명령의 출력을 리디렉션하면 빈 파일이 생성됩니다.

*/1 * * * * bluetooth-sendto --device=MACADDR path/to/read.txt>path/to/err.log

디렉토리와 파일의 권한은 777입니다. Cronjob은 명령줄에서 직접 명령을 실행할 수 있는 동일한 사용자로 설정됩니다. 나도 시도했지만 sudo crontab -e작동하지 않았습니다.

크론 로그 파일에서:

Jun 16 14:26:01 localhost CRON[2023]: (user) CMD (bluetooth-sendto --device=xx:xx:xx:xx:xx:xx /home/user/read.txt)
Jun 16 14:26:01 localhost CRON[2016]: (CRON) info (No MTA installed, discarding output)

답변1

bluetooth-sendGUI 응용 프로그램이며 헤드리스 또는 X 연결 주소 없이는 작동하지 않습니다.

를 사용하시길 권장합니다 ussp-push. 명령은 다음과 같습니다ussp-push 12:34:56:78:9A:BC@ localname remotename

관련 정보