Category Archives: Linux commandline

Get size of all code files in a directory

I got a question on how to get all files in a directory listing containing code. This is what I used: find . \( -name ‘*.bb*’ -o -name ‘*.h*’ -o -name ‘*.c*’ -o -name ‘*akefile’ -o -name ‘*.sh’ -o -name … Continue reading

Posted in Linux commandline | Tagged , , , | Leave a comment

Getting UUID of a partition for use in /etc/fstab

To get UUID of a partition use the command blkid /dev/sdXX Example me@ubuntudevmach:~/$ blkid /dev/sdb1 /dev/sdb1: UUID=”405d2966-6826-4942-baa4-244f24aa31c3″ TYPE=”ext4″ PTUUID=”775559d3″ PTTYPE=”dos” This is useful when editing /etc/fstab to direct a partition to a folder Example of directing a partition to be … Continue reading

Posted in Linux commandline | Tagged , , | Leave a comment

Copying more files to an existing rootfs image

Check rootfs image e2fsck -f myimage.ext2 Resize it resize2fs myimage.ext2 400M mount it mkdir myimage mount myimage.ext2 myimage copy new content cp newcontent myimage

Posted in Linux commandline | Tagged , , | Leave a comment