Photo by Kevin Horvat on Unsplash1D1C - dirnamestrip last component from file nameSyed Jafer K·Sep 7, 2022·1 min readdirname - strip last component from file name a. dirname /home/syedjafer/sample.txt b. dirname -z /home/syedjafer/sample.txt -z, --zero -> end each output line with NULL, not newline Credits: tkdhanasekar@gmail.com Ubuntushellillugcidicdirname Share this