Skip to content
Advertisement

Linux Shell Script – Mounting and Backing Up Files

I’m writing my first shell script. I want to check if a filesystem is mounted. If so, then backup the documents from my main drive to the backup that is mounted. If not, mount the filesystem, then backup the documents.

JavaScript

I executed the script, yet all I got was a lot of text. It didn’t perform as I wanted. Did I not use the right options or arguments for one of the functions?

Advertisement

Answer

I suggest such a script for you:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement