This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount -t cifs -o username=user,password=pass\!word //192.168.XX.XX/someshare /mnt/localdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use : diff_invert.sh somepatchtoinvert.diff | |
PATCHNAME=$1 | |
interdiff $PATCHNAME /dev/null > $PATCHNAME_inverted | |
rm $PATCHNAME | |
mv $PATCHNAME_inverted $PATCHNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Find all files with the size bigger than 1G | |
find all files > 1 GB find . -type f -size +1G -exec ls -lh {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -not -iwholename '*.svn*' -print0 | xargs -r0 du -shc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding analyzing | |
find . | grep -P "[\x80-\xFF]" | iconv -f latin1 -t utf8 | |
# test launch | |
find . | grep -P "[\x80-\xFF]" | rename -n 'BEGIN {binmode STDIN, ":encoding(latin1)"; use Encode;} $_=encode("utf8", $_)' | |
# rename | |
find . | grep -P "[\x80-\xFF]" | rename -n 'BEGIN {binmode STDIN, ":encoding(latin1)"; use Encode;} $_=encode("utf8", $_)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -l SSHLOGIN RE.MO.TE.IP "mysqldump DB -uMYSQLLOGIN -pMYSQLPWD | gzip -3 -c" > DB.sql.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="fr-FR"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="refresh" content="0;url=http://example.com"> | |
<script type="text/javascript"> | |
window.location.href = "http://example.com" | |
</script> | |
<title>Page Redirection</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="fr-FR"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
Content | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Number of accesses, daily | |
zcat access.log.1.gz | awk {'print $4'} | cut -c2-12 | sort | uniq -c | |
# Number of accesses, hourly | |
zcat access.log.1.gz | awk {'print $4'} | cut -c2-15 | sort | uniq -c | |
# Number of accesses, minutely | |
zcat access.log.1.gz | awk {'print $4'} | cut -c2-18 | sort | uniq -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints the list of visitors IPs rated by accesses | |
zcat access.log.21-04-2013.gz | awk {'print $1'} | sort | uniq -c | sort -h |