Incremental Backup using dump
Make a incremental backup of directory ‘/home/binnyva’
dump -1aj -f home.bak /home/binnyva/
Make a incremental backup of directory ‘/home/binnyva’
dump -1aj -f home.bak /home/binnyva/
Make a full backup of directory ‘/home’
dump -0aj -f home.bak /home
This command removes all the even lines from the file given as the argument
cat example.txt|awk 'NR%2==1'
Use this code to force a download of any type of content with PHP
header("Content-type:application/octect-stream");
header('Content-Disposition: attachment; filename=filename_' . date('Y-m-d') . '.sql');
print "Hello World";
Makes a file immutable - it can not be removed, altered, renamed or linked
chattr +i file
View from 1th to 5th line
sed -n '1,5p;5q' example.txt
This command moves all the files in the subfolder to the current folder.
mv */* .
Remove empty characters at the end of each row
sed -e 's/ *$//' file.txt
Use this command if you want to know your command usage stats in the fish shell.
grep -v "^\#" ".config/fish/fish_history"|awk '{print $1}'|sort|uniq -c|sort -rn|head -n10