Category: Command Line

Force delete a file

Force delete a file rm -f file

Tail Command in Follow Mode

View in real time what is added to a file. -f stands for Follow tail -f /var/log/messages

Network Stats

Show network adpters and statistics cat /proc/net/dev

Change File Encoding

Creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding….

Batch Resize Images with ImageMagick

Batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick) find ….

Cpuinfo

Linux command to show information about the CPU cat /proc/cpuinfo # Result (example) processor : 0 vendor_id : AuthenticAMD cpu…

tree Command

Show files and directories in a tree tree

Seach for a String in a Folder using grep

Search string “test_text” at directory ‘/var/log’ and below grep test_text -R /var/log/*

Remove Empty Lines and Comments

Remove comments and blank lines from example.pl sed ‘/ *#/d; /^$/d’ example.pl

See Mounted File Systems

Shows all mounted file systems in Linux cat /proc/mounts