Changes

Jump to navigation Jump to search
288 bytes added ,  10:27, 25 April 2019
m
Line 203: Line 203:  
===stderr and stdout 2 file===
 
===stderr and stdout 2 file===
 
  rm -f $(find / -name core) &> /dev/null
 
  rm -f $(find / -name core) &> /dev/null
==extras==
+
==Extras==
 +
 
 +
=== Set files and folder permissions ===
 +
<syntaxhighlight lang="bash">
 +
#!/bin/sh
 +
# syntax: setperm.s destdir
 +
#
 +
 
 +
destdir=/var/www/rrahome
 +
 
 +
dirmode=0770
 +
filemode=0660
 +
 
 +
find $destdir -type f -exec chmod ${filemode} {} \;
 +
find $destdir -type d -exec chmod ${dirmode} {} \;
 +
</syntaxhighlight>
 +
 
 
===Backup Hard Drive===
 
===Backup Hard Drive===
 
<source lang="bash">#!/bin/bash
 
<source lang="bash">#!/bin/bash
Line 223: Line 239:  
dd if=${HD} of=${ISO} bs=1M</source>
 
dd if=${HD} of=${ISO} bs=1M</source>
   −
=== Extract date from string ===
+
===Extract date from string===
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
#!/bin/bash
 
#!/bin/bash

Navigation menu