Category Archives: linux

bash: /usr/bin/[ls,find,mv]: Argument list too long

for f in $(echo folder*/file*); do mv ${f} .; done

Posted in linux | Leave a comment

s3 rename in batch

# rename.sh this example move all files in folder1 up to root directory, you can modify bucket name and regex to rename the files for f in $(aws s3 ls –recursive s3://bucket1/folder1/ | awk -F’ ‘ ‘{print $4}’);   do … Continue reading

Posted in hadoop, linux | Leave a comment

sort by tab delimited column

sort -t$’\t’ -k17n,17 xxx.txt

Posted in linux | Tagged | Leave a comment