Tags
- ALGOL 68
- Alpha
- apt
- audio
- bash
- buster
- C/C++
- GDM
- GNOME
- grub
- i2c
- jessie
- KDE
- lenny
- lightdm
- lighttpd
- MATE
- micropython
- Minix
- photography
- pygame
- python
- qemu
- Raspberry Pi
- Raspberry Pi 3
- Raspberry Pi Zero W
- retrocomputing
- sensehat
- simh
- squeeze
- ssh
- stretch
- ubuntu
- UFW
- VAX
- video
- VMS
- wheezy
- wireless
- wordpress
- xdmcp
- XFCE
- xrandr
- X windows
- yum
Updated
-
Recent
Popular
- Changing the IP address used by Wordpress
- Booting in Text Mode with GRUB2
- Determine MTU size using ping
- Set Linux Console Height and Width
- Error message 'Running /scripts/local-block..' on boot
- Coding for Carrots - Solutions
- Reducing the size of a QEMU virtual disk
- Setting the network MTU size
- Configuring a linux wireless access point
- Using QEMU with a bridge network device
Recommended
-
- 954,632 hits
Tag Archives: bash
Finding files based on their modification date
To list any files in the current folder that have been modified today, you need to search for files that are less than one day old.
Searching Files
The following (rather long) command will search all the specified files in the current folder for the matching text and display the file names and matching lines.
Find default network device
A quick one line command that returns the name of the default network device. $ echo $(ip route | sed -e “/^.*default.*/! d” -e “s/^.*dev.//” | cut -f 1 -d ‘ ‘) eth0 $
Kill a named task
It is probably something of an understatement to say that not all versions of UNIX are the same, however it can still be a bit of a surprise when a command you have got used to using simply doesn’t exist.
Look for differences in two columns
Most of the time when I want to select a field or filter the output from a command I can get by with simply using various combinations of ‘cut’ and ‘grep’, this time I wanted to compare two bit patterns … Continue reading
How to iterate over all the files in a folder
The following commands allow you to iterate over all the files in a folder, and execute a command on each one.
Burning CDROM images
Burning CDROM images to a blank disc from the command line is probably simpler than you think, and most of the time it just works.
Obfuscating IP addresses
When posting stuff on line it is generally a good idea not to give away too much, so decided to see if could come up with a little python script that used a regular expression to remove any IP addresses … Continue reading
Undoing a git-hub commit
Although I try to be careful there are occasions when I push a commit to git-hub only to discover I’ve forgotten to update the change history in the comments or check my spelling!
Converting filenames to lowercase
A quick one liner that renames any files with uppercase characters in their filenames to lowercase $ ls | grep -v [a-z] | \ > while read -r name; do mv -v "$name" "`echo $name |tr '[A-Z]' '[a-z]'`"; done