The boxes utility for Linux allows you to render an ascii text box around text. Below is an example. homer@homer-eME730 19:14:21 ~ $ echo `echo “This is a sentence printed to the terminal.”` | boxes /***********************************************/ /* This is a sentence printed to the terminal. */ /***********************************************/ This is a useful utility if you want … Continue reading Some useful Linux commands and tricks for the bash shell user.
The mount command shows information about your mounted partitions on your machine. iMac305:~ admin$ mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) map -fstab on /Network/Servers (autofs, automounted, nobrowse) /dev/disk0s3 on /Volumes/Scratch (hfs, local, journaled) … Continue reading Useful Macintosh OSX terminal commands to get information about your iMac.
Use this command to capture packets with the tcpdump command. This will output to STDOUT, but you may use redirection to divert it to a text file. [root@deusexmachina homer]# tcpdump -i wlp2s0 This is the output that you get when you are capturing packets. This is on my home network, so there are not many … Continue reading Using tcpdump to capture packets with a wireless connected computer.
This sed trick will filter out the unwanted characters and leave only the letters ‘A’. homer@deusexmachina ~ $ echo “###AAA” | sed ‘s/###//gi’ AAA This is how to re-bind the annoying CAPS-Lock key to Esc. This can give that key a new use. xmodmap -e ‘clear Lock’ -e ‘keycode 0x42 = Escape’ & Here is … Continue reading More useful shell tricks for bash. These are very useful tricks for any Linux user.
Find all files larger than 1 megabyte in a directory. find . -maxdepth 1 -type f -size +1M -printf “%f:%s\n” | sort -t”:” -k2 Search a file for a certain string. grep “hello” my.txt Get the hostname from an IP address. Homer@bejiitas – $ ipcalc -h 126.96.36.199/24 HOSTNAME=google.com Use wildcards on the command line to … Continue reading Some miscellaneous Linux commands for the desktop user.
If you are interested in how the Linux filesystem works, then this is a posting you really need to read: http://geekblog.oneandoneis2.org/index.php/2006/08/17/why_doesn_t_linux_need_defragmenting. This is a posting explaining how the Linux filesystem stores file and why it does not need to defragment the filesystem as it stores files more efficiently. I have never wanted to defragment a … Continue reading A useful posting explaining why Linux does not need defragmenting.
This is a very strange shell trick that allows you to have a set of parameters to a Linux command that are separated by single quotes. [homer@localhost ~]$ df -h’l’a’T’ Filesystem Type Size Used Avail Use% Mounted on rootfs rootfs 216G 75G 130G 37% / proc proc 0 0 0 – /proc sysfs sysfs 0 … Continue reading Strange but useful shell trick with the bash shell.
Some very useful Linux shell commands and tricks. Print numbers in sequence. [homer@localhost ~]$ seq 8 24 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Print numbers in sequence, but only multiples of 8. [homer@localhost ~]$ seq 8 8 128 8 16 24 32 40 48 … Continue reading Some very cool Linux shell tips and tricks for old and new users alike.
Linux hardware information commands. There are many commands available for Linux that allow the user to get information about their hardware. Here is a handful of them. The lshw command. deusexmachina description: Notebook product: eME730 (Calpella_CRB) vendor: eMachines version: V1.15 serial: LXN98020810441E9781601 width: 64 bits capabilities: smbios-2.6 dmi-2.6 vsyscall32 configuration: boot=normal chassis=notebook family=Intel_Mobile sku=Calpella_CRB uuid=40198687-F9A4-2099-05F2-88AE1D6D09BC … Continue reading Linux commands to find out hardware information.
The WIFI Radar application for Linux is used to perform a wireless site survey to determine the signal strength of a wireless network that you are deploying at a particular site. This application makes a survey of wireless signal strength very easy indeed. The SSID/MAC address of the access point is shown, as well as … Continue reading Another look at the WIFI Radar application for Linux. A good tool for a wireless site survey.
The md5sum command on Linux is used to get a number that is the checksum of the file. This is commonly used to verify downloaded files to check that the file has not been modified. Below is an example, the md5sum command is used on a BMP file and I get the file checksum output … Continue reading How to get the MD5 sum of a file with the Linux command line and the md5sum command.
I am using this command to search the Internet for open ports on port 80 with nmap. sudo nmap -sS -iR 0 -p 80 -oG nmap.grepable Then I use this command in another terminal tab to view the updating file. This will be updated every two seconds with new file content. watch cat nmap.grepable This … Continue reading How to use the watch command to update a terminal every 2 seconds with an updating file.
This is how to do this; just add the backticks and you may then echo the output of the logname command in this echo string. echo “Hello `logname`, this is a nice day is it not?” This will add the output of the command by executing it and showing the output. Here we are showing … Continue reading How to add the output of a command when echoing text with bash.
I have uploaded my sysinfo program to GitHub, this makes it easier for me to manage the code and have a revision control system to control changes to the code. I have added code to print information about your Motherboard and the BIOS. I wish there was a proper programming interface to get this information … Continue reading My sysinfo program is now on GitHub!
How to setup Ubuntu 13.10 with a proper desktop environment. I just installed Ubuntu 13.10 and I had to update the package repositories. This is essential to install software. homer@deusvult:~/Documents$ sudo apt-get update After this I could install the initial set of packages to setup my system. homer@deusvult:~/Documents$ sudo apt-get install me-tv vlc ubuntu-restricted-extras smplayer … Continue reading How to setup Ubuntu 13.10 with a better desktop environment. Better than Unity.