Tag Info

New answers tagged

0

I was looking for this information too. I took a punt and tried: $ fdisk -l /dev/cdrom and it appears to work: Disk /dev/cdrom: 4.4 GiB, 4700372992 bytes, 2295104 sectors Units: sectors of 1 * 2048 = 2048 bytes Sector size (logical/physical): 2048 bytes / 2048 bytes I/O size (minimum/optimal): 2048 bytes / 2048 bytes which concurred with ...


3

Get the file size: size="$(stat --printf="%s" "$path")" Get the path without the last extension: path_without_extension="${path%.*}" Compare the two: [ "${path_without_extension}.${size}" = "$path" ]


-1

ls -l | awk '{print $5}' gives your file size echo file_name | awk -F"." '{print $3}' gives you file size extracted from name. a=`ls -l | awk '{print $5}'` b=`echo file_name | awk -F"." '{print $3}'` if [ $a -eq $b ] then echo "you can do your processing here" fi



Top 50 recent answers are included