This command will replace spaces in filename with number
This command is similar to the above, but is much simpler to remember. Sure, it's isn't as precise as the parent command, but most people aren't going to remember those --flags anyways unless you stick it into your .bashrc on every single system that you manage. Show Sample Output
Use this command to watch video files on the terminal using VLC. prerequisite: VLC and cvlc sudo apt-get install vlc cvlc Show Sample Output
1st log (samba) has filters to omit annoying repetetive connections and messages about cups printer sharing, and ONLY show messages pertaining to connections to a samba service. Also requires Samba be configured to use a single logfile. use the path to your single samba logfile. 2nd log (for SSH) point to your /var/log/auth.log file. change path as needed. cron is filtered out to avoid looking at processes spawned by cron. which just eats up the screen unnecessarily. 3rd log (FTP), point at the logfile for your ftp daemon. assuming it uses a single file and does so neatly. multitail has lots of options. season to your tastes. this is a highly dumbed down version of the one liner I actually use for this, which incorporates several more logs, color options, window size options etc. depending how much garbage is generated by certain logs and what strings you ignore, when spawning this you may not see any previous log lines. this can be fixed using options like "-n [number]" to search back far enough to produce some lines. otherwise don't worry, it will display newly logged lines. --follow-all is used to follow filenames instead of descriptors. an important thing when following logfiles that rotate as most do.
I have this in my .bash_aliases and call it before running apt-get install or apt-get upgrade Example: alias apt-install='apt-update; apt-get install' alias apt-upgrade='apt-update; apt-get upgrade' function apt-update () { if [[ $(expr $(date +%s) - $(stat -c %X /var/lib/apt/periodic/update-success-stamp)) -gt 86400 ]]; then sudo apt-get update else echo apt is up to date fi }
Where $1 = author and $2 = mod name
You need to be running a daily build of Minetest (for example from the 'minetestdevs/daily-builds' PPA), or some bleeding edge mods will not work or crash the game.
Update a mod by entering its subdirectory under ~/.minetest/mods and doing
git pull && git submodule update --recursive --remote --init
To list open ports on a local Linux system that are transferring data To list only the IPv4 connections, then replace "-i" with "-i4", and to list only IPv6, use "-i6"
IMPORTANT: You need Windows PowerShell to run this command - in your Windows Command Prompt, type
powershell
Create a log file of your Motorola Surfboard SB6141 downstream signal strengths.
Uses the built-in curl to request signal strength data from your SB6141 cable modem.
HTML page 192.168.100.1/cmSignalData.htm has the signal strength numbers for the 8 downstreams.
Some HTML/DOM processing parses out the 8 values from the above page.
The eight extracted signal strengths are then logged to a file.
A small while-loop watches the clock & repeats the process every 10 seconds.
Show Sample Output
Display the top processes sorted by memory usage. This is mostly useful because it's easy to remember and can give me a quick 'top' view of a group of servers when used over pssh. (Though I'd recommend |head -10 to minimize the output). Show Sample Output
Useful for grepping an IP range from the maillog. When for instance dealing with a spam-run from a specific IP range, or when errors occur from or to a specific IP-range.
In the example above the IP range 183.0.0.0/10 (183.0.0.0 - 183.63.255.255)
To grep the IP range 124.217.224.0/19 (124.217.224.0 - 124.217.255.255) from the maillog:
egrep '124\.217\.2(2[4-9]|[34][0-9]|5[0-5])' -J /var/log/maillog*
NOTE: the location of the maillog may vary based upon operating system and distribution.
Awk magic to replace: cat /etc/sybase/interfaces | grep -A 1 -e "$SEARCH" | grep query | awk '{ print $4 }' | awk -F'.' '{print $2}'
Of course, a fifo is required for piloting the fade out of another song, but with a few bash function, we can mix music in bash like : crossfadeIn > mplayerfifo1 & crossfadeOut > mplayerfifo2 loop 0 10 > mplayer fifo1 etc etc
pcspkr have to be enabled! modprobe pcspkr xset b on
For less time Show Sample Output
Replace the first part of the command above with the appropriate timezone string. Eg: 'Europe/London' or for UTC - 'Etc/UTC'. The appropriate string can be found from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones This is useful when your server is installed by a data centre (managed hardware, VPS, etc) and the timezone is not usually set to the one your prefer.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: