1

Topic: fdisk + crontab

I can not force  to run under crontab.
For example in sudo crontab-e I write
@reboot/home/user/1cron
Where 1cron looks so -
sudo/sbin/fdisk/dev/mmcblk0 </home/user/11cron
a 11cron looks so -
d
1
d
n
p
1
501760
w
If I launch 1cron simply since a line of the terminal all works. It picks up a file 11cron and a beret from it commands. But through  tried already many variants and it does nothing.
Itself  basically works others checkout  executes, but with 1cron any problem.
, a help!

2

Re: fdisk + crontab

tanya_777 :
Where 1cron looks so -
sudo/sbin/fdisk/dev/mmcblk0 </home/user/11cron

Instead of sudo:/usr/bin/sudo
But , there should be any another - more simple - a method to check up disks at reboot.

3

Re: fdisk + crontab

Thanks, I will try.
There not about check speech, and about change partitions.

4

Re: fdisk + crontab

tanya_777
There not about check speech, and about
So you at once write the purpose. What for at  to reformat a disk?
For certain there is a method easier.
And system specify.

5

Re: fdisk + crontab

It is written down  from one of linux os on SD a card, it is necessary to expand it on all value of a card.
In the beginning to move , then to make restart and resize2fs. As now  does not use all volume of a card.
Also it is necessary to make it . The last command, after , restart and resize2fs  erases itself. crontab-r
Basically the purpose here is not especially important. Important that  it was launched normally through .
Adding from 10/22/2016 11:42:

tanya_777 :
Thanks, I will try.
There not about check speech, and about change partitions.

/usr/bin/sudo did not help (.

6

Re: fdisk + crontab

tanya_777
Basically the purpose here is not especially important.
You explicitly try to scratch an ear a foot heel .
Explain the initial purpose, and to you explain as to solve your problem.
And system specify.

7

Re: fdisk + crontab

Can and so, about to scratch.
Is  with OSMC on a card micro sd. To transfer it for setting still to someone  it is compressed, it  decreases to a minimum. It to make  it is less 8G. At a rewriting on a new card  does not use all volume of a card,  remains compressed. I want that at the first switching-on  expanded  to the full volume of a card.

8

Re: fdisk + crontab

In  before the job:
MAILTO = "your address"
Also check in mail.

9

Re: fdisk + crontab

Yes, did already. Does not send anything.
Adding from 10/22/2016 20:07:
Understood. There one blank line in a file with  not .

10

Re: fdisk + crontab

c the second section and  the religion does not allow?. I would be afraid such things to do by the automatic machine

11

Re: fdisk + crontab

- PAWEL - :
I would be afraid such things to do by the automatic machine

what reason of such phobia?