• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux batch files?

dirtboy

Diamond Member
I would like to automate backing up a comple directories. Normally I log in and tar the directories, then ftp them off the server and then delete the tar'd files.

What is the equivelent to MS-DOS batch files in Linux?😕

I plan to create two, one to tar the directories and then one to delete the tar'd files.
 
Shell scripts, and they are very powerful.
For example, one easy shell script to archive all files in a dir and send them to some other box:

Code:
#!/bin/sh

tar zcf /tmp/temp.tar.gz /mydir
scp /tmp/temp.tar.gz [email]backup@some.other.box[/email]:backups/yourbox-`date +%Y%m%d%H%M`

archives all files in /mydir, and sends that file using scp (from SSH) to some.other.box, under the name backups/yourbox-YEARMONTHDAYHOURMINUTE

🙂
 
Back
Top