Tag: Linux

Set Time

Set date and time – MonthDayhoursMinutesYear.Seconds date 041217002007.00

Full Year Calendar

Show the calendar of 2008 cal 2008

Show Interrupts

Show interrupts cat /proc/interrupts

Show file swap

show file(s) swap cat /proc/swaps

NIC Card Configuration

Show configuration of an ethernet network card ifconfig eth0

Fetch a URL With a Number Series

Use this command to download numbered content… for ((i=1; i

Zero Padding In Linux Commands

This is how you zero pad a numerical variable in bash. for ((x=1;x<=31;x+=1)); do echo `printf “%02d” $x`; done Original…

Create ISO Image of a Folder

Create an iso image of a directory mkisofs -J -allow-leading-dots -R -V “Label CD” -iso-level 4 -o ./cd.iso data_cd

Uncompressing a BZ2 File

Decompress a file called ‘file.bz2’ bunzip2 file.bz2

XMLStarlet

Using XMLStarlet… curl -s ‘http://bashcurescancer.com/rss/’ | xml sel -t -m ‘//link’ -v ‘.’ -n http://bashcurescancer.com http://bashcurescancer.com/processing-xml-on-the-command-line.html http://bashcurescancer.com/do-not-close-stderr.html http://bashcurescancer.com/prepend-to-a-file-with-sponge-from-moreutils.html http://bashcurescancer.com/bug-in-curl-is-fixed.html http://bashcurescancer.com/using-kill-to-see-if-a-process-is-alive.html…