Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
BASH
(view source)
Revision as of 18:26, 28 January 2019
368 bytes added
,
18:26, 28 January 2019
→extras
Line 204:
Line 204:
rm -f $(find / -name core) &> /dev/null
rm -f $(find / -name core) &> /dev/null
== extras ==
== extras ==
+
=== Backup Hard Drive ===
+
<source lang="bash">#!/bin/bash
+
USAGE="./$(basename ${0}) UUID output.iso"
+
+
if [ -z "${1}" ]; then
+
echo ${USAGE}
+
exit
+
fi
+
if [ -z "${2}" ]; then
+
echo ${USAGE}
+
exit
+
fi
+
+
BACKUP_ROOT=/mnt/backup
+
HD=$(blkid|grep $1|awk -F : '{print $1}')
+
ISO=${BACKUP_ROOT}/$(hostname)/$(date '+%Y/%m')/$2.iso
+
dd if=${HD} of=${ISO} bs=1M</source>
=== Ping IP range ===
=== Ping IP range ===
<source lang="bash">#!/bin/bash
<source lang="bash">#!/bin/bash
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version