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-keygen -l -f /path/to/keys/id_rsa.pub | |
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA) |
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
fconfigure $fd_bit -translation binary |
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
# sync all files starting with 0-9 or a-n or A-N | |
rsync -vram -f'+ [0-9a-nA-N]*' -f'+ */' -f'- *' /src /dest1 | |
# sync all files starting with m-z or M-Z | |
rsync -vram -f'+ [m-zM-Z]*' -f'+ */' -f'- *' /src /dest2 |
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 /path/to/files -type f -print0 | xargs -0 ls -l | awk '{x+=$5} END {print "total bytes: " x}' |
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
fdisk -l | grep '^Disk'; # list drives | |
file -s /dev/sdd; # list device sdd details | |
fsck /dev/sdd; # check device sdd | |
fdisk /dev/sdd; # partition drive | |
# m - print help | |
# p - print the partition table | |
# n - create a new partition | |
# d - delete a partition | |
# q - quit without saving changes |
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
# mcsplit -- | |
# | |
# Splits a string based using another string | |
# | |
# Arguments: | |
# str string to split into pieces | |
# splitStr substring | |
# mc magic character that must not exist in the orignal string. | |
# Defaults to the NULL character. Must be a single character. | |
# Results: |
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
" This must be first, because it changes other options as side effect | |
set nocompatible | |
" Use pathogen to easily modify the runtime path to include all | |
" plugins under the ~/.vim/bundle directory | |
call pathogen#helptags() | |
call pathogen#runtime_append_all_bundles() | |
"Quickly edit/reload the vimrc file | |
nmap <silent> <leader>ev :e $MYVIMRC<CR> |
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/sh | |
# To copy from the one file to several directories, use: | |
find -maxdepth 1 -mindepth 1 -type d -exec cp ${1} {} \; |
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
rm contents.txt | |
ls *.zip > filelist | |
for FILENAME in `cat filelist` | |
do | |
unzip -l $FILENAME >> contents.txt | |
done | |
rm filelist |
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
* | |
!/a | |
/a/* | |
!/a/b | |
/a/b/* | |
!/a/b/c | |
/a/b/c/* | |
!/a/b/c/foo | |
# don't forget this one |
NewerOlder