std/c/src/: Add `make testsrc`, checks for lines longer than 79 chars
[sunny256-utils.git] / Div / bash-cmds.txt
blobf6c596c08daa31a245e5d409df9d0a262fbc0bb2
1 bash-cmds.txt
2 File ID: d5efb828-f153-11e0-8fb3-fefdb24f8e10
3 Author: Ã˜yvind A. Holm <sunny@sunbase.org>
5 Create tags and branches in repos created by git-svn:
6   for f in $(git branch -a | grep /tags/); do echo $f; git tag $(echo -n $f | perl -pe 's/remotes\/tags\///') $(git log -1 --format=%H $f); done
7   for f in $(git branch -a | grep -v /tags/ | grep '^  '); do echo $f; git branch $(echo -n $f | perl -pe 's/^remotes\///') $(git log -1 --format=%H $f); done
9 Remove the origin stuff after git filter-branch:
10   git update-ref -d refs/original/refs/heads/master
12 Go through previous versions of repos in Git.git:
13   git log --format=%H -- gps.git | while read f; do echo ========== $f; git lg -- gps.git | cat; git co -f $f; git clean -fxd; (cd gps.git && (git dangling; git push --all /home/sunny/Git-all/gps.git)); done
15 Plot activity graph of Git repos:
16   git log --format=%ct | ep_day -w 1 | ep | head -n -1 >/tmp/stpl.tmp; stpl -lp /tmp/stpl.tmp
18 Format USB sticks:
19   sess -- mkfs.ext4 -m 0 -L LABEL_MAX_16_BYTES -U `suuid -t mkfs,ext4 -c "TEXT" -wa` /dev/DEVICE
20   sess -- mkfs.vfat -n NAME_11_CHARS_MAX -i `suuid -t mkfs,vfat -c "TEXT" -wa | head -c8` /dev/DEVICE
22 Run fsck on ext* filesystems with progress bar:
23   sess -c "COMMENT" -t fsck -- fsck.extVER -C 0 -p -v /dev/PARTITION
25 vim: set ts=2 sw=2 sts=2 tw=0 et fo=tcqw fenc=utf8 :
26 vim: set com=b\:#,fb\:-,fb\:*,n\:> :