meta

what's the meta about say it ditto dot net?

User Tools

Site Tools


terminal:miscbash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
terminal:miscbash [2025/02/07 02:22] – created meloterminal:miscbash [2025/08/17 16:08] (current) – makemkv workaround no longer needed melo
Line 1: Line 1:
-move files from nested sub-folders to top level working directory+===== misc bash terminal stuff ===== 
 + 
 +aliases and stuff 
 + 
 +==== number files from start ==== 
 + 
 +<code bash> 
 +i=29 # add 1 to last number in batch 
 +for f in *.png; do 
 +   dest=$(printf "%02d" $i).png 
 +   mv "$f" "$dest" 
 +   i=$((i + 1)) 
 +done 
 +</code> 
 + 
 +[[https://stackoverflow.com/questions/57860821/rename-files-with-incrementing-number-starting-at-certain-number|source]] 
 + 
 +==== push to all git remotes ==== 
 + 
 +i'm lazy ok 
 + 
 +<code bash> 
 +alias gitall="git remote | xargs -L1 git push --all" 
 +</code> 
 + 
 +==== youtube to MP3 === 
 + 
 +what the comment says 
 + 
 +<code bash> 
 +# lazy ass way for me to get my idol mp3s from youtube 
 +# usage: ytmp3 url 
 +alias ytmp3="yt-dlp -f ba -x --audio-format mp3" 
 +</code> 
 + 
 +==== move nested files to top-level dir ====
  
 (this will overwrite files with same names so rename with filebot beforehand if needed) (this will overwrite files with same names so rename with filebot beforehand if needed)
  
-<code>find . -mindepth 2 -type f -print -exec mv {} . \;</code>+i use this for counting icons usually, hence the alias name 
 + 
 +<code bash> 
 +alias iconsubfol="find . -mindepth 2 -type f -print -exec mv {} . \;
 +</code> 
 + 
 +==== PDF to PNG ==== 
 + 
 +not used in a while 
 + 
 +<code bash> 
 +gs -sDEVICE=pngalpha -o file-%03d.png -r144 zine.pdf 
 +</code>
terminal/miscbash.1738894950.txt.gz · Last modified: (external edit)