Renaming a set of files
# rename all .jpeg files to .jpg for file in *.jpeg; do mv $file ${file%.jpeg}.jpg; done # make all the files in the current directory… Read More »Renaming a set of files
# rename all .jpeg files to .jpg for file in *.jpeg; do mv $file ${file%.jpeg}.jpg; done # make all the files in the current directory… Read More »Renaming a set of files
echo $((RANDOM%256)).$((RANDOM%256)).$((RANDOM%256)).$((RANDOM%256))
#!/bin/bash prefixe=backup suffixe=$(date +%Y%m%d) filename=$prefixe$suffixe.sql host=host database=database user=user characterSet=UTF8 mysqldump –skip-comments \ –complete-insert \ –default-character-set=$characterSet \ –no-create-info \ –skip-add-locks \ –skip-opt \ –host $host \… Read More »mysql_backup.sh
mv file.txt file.bak; tr -d ‘\r‘ < file.bak> file.txt
FILE SPACING: ย # double space a file ย sed G ย # double space a file which already has blank lines in it. Output file ย # should… Read More »Sed cheat sheet / one-line sed
find / –size +10000000c –printf “%15s %pn”
# Add this alias into ~/.bashrc alias scpresume=‘rsync –partial –progress –rsh=ssh’ # begin a scp copy: scp foo user@remotehost:/tmp/ # if a problem occur during… Read More »scp resume
find / -perm -0002 –type d -print find / -perm -0002 –type f -print
#terminal C:\>mysql -uroot -p mysql> SELECT version(); # cliente mysql SELECT version();