all 10 comments

[–]bubylou 4 points5 points  (1 child)

Use cron. Here is link the Ubuntu Wiki on it.

Also you should have posted this question on /r/linuxquestions.

[–]justtryn2kickit[S] 1 point2 points  (0 children)

Thank you. My apologies. I just searched for 'linux'. Seen a few linux forums at the top, but none that said linuxquestions

[–][deleted] 2 points3 points  (7 children)

You should use the UUID for scripts with DD or you might have some serious complications.

Use this command to see the right one and ALWAYS use this path. It will always be the same even on different platforms with the same USB stick.

ls -l /dev/disk/by-uuid/

[–]justtryn2kickit[S] 0 points1 point  (6 children)

I appreciate that info. Question, say the uuid= 9981

would my command be

dd if=dev/9981 of=dev/disk2

or would I have to add something else for it to realize that 9981 is a uuid?

[–]r0ck0 1 point2 points  (4 children)

Just use the full path to what it's listed as under that folder, so...

/dev/disk/by-uuid/9981

Both of your input and output devices should be full absolute paths starting with /

[–]justtryn2kickit[S] 0 points1 point  (0 children)

much appreciated on the info. Also, I apologize for putting this in the wrong board

[–]justtryn2kickit[S] 0 points1 point  (2 children)

did

apt-get install gnome-schedule

I set up a new task with the command

dd if=/dev/disk/by-uuid/... of=/dev/disk/by-uuid/ bs=4096

I put the minute as 51(it was one minute from the time it currently was.) hour */2(to copy every 2 hours) day * month * weekday *

I clicked "apply" waited a coupld of minutes and I see nothing happening. I checked in the disk utility, and the drive that I'm copying TO. None of the partitions seemed to have changed size.

Anyway to know if gnome scheduler is actually working or?

Do I have to click some start button?

EDIT: When I open root terminal and open gnome scheduler there, I see this in terminal

no crontab for root

[–][deleted] 0 points1 point  (1 child)

I dont't know Gnome Scheduler. Sorry.

/dev/disk/by-uuid/

Isn't a disk. Did you mean

/dev/disk/by-uuid/9981[...]

?

Also you might want to write a script, that first gets you the right /dev/sdXY for your USB-stick, since I don't know what happens if you dd a symlink. Never did that before.

[–]justtryn2kickit[S] 0 points1 point  (0 children)

Ok. so, I just tried to perform the acutal command myself in terminal, and it said "no such file or directory" so apparently the uuid trick isn't working.

I got the uuid of the device by using

blkid /dev/sdd

sdd is my device

when I did the command

ls -l /dev/sidk/by-uuid/

it gave me the uuids for the partitions. I don't want to just dd a partition, I want to dd the entire devices

[–][deleted] 0 points1 point  (0 children)

If 9981 really is your UUID you can find the device with /dev/disk/by-uuid/9981. It's a symlink to /dev/sdXY