So far I have tried
extension=$(find /home/path-to-dir -type f -name '*.*' | sed 's/^.*\.//' | sort -u)
It is giving me extension right after . but it is failing for text.data.json ( I only need json)
similar example stack/~.hello.py ( I only need py)
also I m trying to find the creation date of a file ? is it possible ?
seddoesn't provide a way to turn that off -- if you runecho 'foo.bar.baz' | sed 's/^.*\.//', you get onlybaz, notbar.baz. Can you provide a minimal reproducible example that lets others see your problem?for i in *;do [[ -f $i ]] && echo ${i##*.};done|sort -u