Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
BASH
(view source)
Revision as of 10:27, 25 April 2019
288 bytes added
,
10:27, 25 April 2019
m
→extras
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
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