1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| function abs_path() { python -c "import os.path; print(os.path.realpath('$0'))"; }
ABS_PATH=`abs_path`
$(dirname $ABS_PATH)
$(basename $ABS_PATH)
function download_and_extract_to() { URL=$1 FOLDER=$2
FILENAME=$(basename $URL)
wget $URL mkdir -p $FOLDER tar --strip 1 -xf $FILENAME -C $FOLDER rm $FILENAME }
: > file.txt truncate -s0 file.txt
find $(pwd) -type f > filelist.txt
dd count=<copy_N_ibs_sized_blocks> skip==<copy_N_ibs_sized_blocks> \ if=<input_file> of=<output_file>
dd iflag=count_bytes,skip_bytes count=<copy_bytes> skip=<skip_bytes> \ if=<input_file> of=<output_file>
find . -type f -name "*.java" -print0 |xargs -0 grep -li "keyword"
find . -type f -name "*.java" -print0 |xargs -0 -n1 echo
find /path -type f -name '*~' -print0 | xargs -0 -I % cp -a % ~/backups
find /path -type f -name '*~' -print0 | xargs -0 bash -c \ 'for filename; do cp -a "$filename" ~/backups; done' bash
|