You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
JosephMeli e64567696c replaced the mnt point 5 years ago
mnt replaced the mnt point 5 years ago
src Updated echo output 5 years ago mike changes 5 years ago 5 years ago
help.txt adjusted condtionals to check for command line argument situations 5 years ago Joe's Changes 5 years ago fixed issuse with help command flag 5 years ago



##Filename: -> Main Driver run using:

$ ./ [option] [absolute file path]


[option][ [absolute file path] - both options are required

  • -m :calls mount function from
  • -c :calls copy function from
  • -mc or -cm: calls mount and copy functions from
  • -u: calls unmount function from
  • -x: calls the clean function from
  • -ux or -xu: calls the unmount and clean function from
  • -h : for this list of commands in the terminal

Note you don't need a file path only when using the -h flag


unmount(): Loops through the mounted point and unmounting all things that are mounted within the created directories.

clean(): This will loop through the mount point and checks if the individual directory is empty. If empty then will remove that directory from the mount point.

amIRoot(): This will exit the program if they are not root. This is for the ability to copy over long periods of time without having to type password again.

Mount(): This will loop through all drives located by-path on /dev/disk/by-path/-usb--part1. So its by path to all recognizable exfat devices and the first partition of those devices. Then will create a new directory for each drive named exactly how your computer names it. Then the contents of each drive will be mounted to the exact same corresponding folder by name. The mount point is a pre-made folder in this repository called mnt.

copy(): Will loop through all the contents of the the directories in the mnt folder as well as go to there /DCIM/ directory.And only copy that folder to a user defined destination. This process happens with rysnc a command that works like rysnc takes three possible arguments. first will be optional flags depending on what you want to sync, the second is source you are copying from and the final is the destination.

sudo ./ -mc /media/asgard-linux/2TB_2 /media/asgard-linux/2TB_1