štvrtok 2. novembra 2023

piatok 14. apríla 2023

How to test microphone with pulseaudio



How to test that your microphone is working, using pulseaudio:

pactl load-module module-loopback latency_msec=1

To disable it again:

pactl unload-module module-loopback

Thanks to: https://askubuntu.com/a/262297

utorok 4. apríla 2023

Set file modification time based on file name (or EXIF data)

This snippet works for the Iphone image/movie files in format: YY-MM-DD HH24-MI-SS NNNN.ext


for f in *mov; do
  echo $f
  touch "$f" -t "20${f:0:2}${f:3:2}${f:6:2}${f:9:2}${f:12:2}.${f:15:2}"
done


Then, to overwrite with EXIF information from JPEG files:

exiv2 -T rename *.jpg


Useful snippet for some of the Iphone files/movies on my disk:

find . -type f -name \*720p.mov | while read LINE; do
  f=$(basename "$LINE")
  echo "$LINE"
  touch "$LINE" -t "20${f:0:2}${f:3:2}${f:6:2}${f:9:2}${f:12:2}.${f:15:2}"
done

Delete broken symlinks

Identify broken symbolic links:

find . -xtype l

To delete as well:

find . -xtype l -delete


Remove duplicate files

Use rdfind tool from Debian repo.

To find duplicate files in directories dir1 (and dir2) with results.txt output file produced:

rdfind dir1 [dir2]


To test:

rdfind -n true -deleteduplicates true dir1 dir2

To delete duplicates:

rdfind -deleteduplicates true dir1 dir2