formats

CentOS Linux or Ubuntu Linux – Get List of ip addresses on Server

Published on April 30, 2013, by + in linux, sysadmin.

CentOS Linux or Ubuntu Linux – Get List of ip addresses on Server | Here’s a quick one-liner to spit out all ip addresses from ifconfig:

formats

Use du to show directory sizes only

Use du to show directory sizes only | du can show directory sizes only. This is helpful to get a quick glance at what directories are taking up space. Here’s the command I like to use: $ du -sh * Here is what it looks like in action from /var on one of my servers: stmiller@li166-66:/var$ sudo du -sh * 38M backups 48M

formats

Encode or Decode base64 from the Command Line

Published on September 1, 2012, by + in linux.

Encode or Decode base64 from the Command Line | If you have ever needed to quickly decode or encode base64, Linux has a command line utility called base64 that works great. I’ll show you how it works! To encode text to base64, use the following syntax: $ echo ‘scottlinux.com rocks’ | base64 c2NvdHRsaW51eC5jb20gcm9ja3MK To decode, use base64 -d. To decode base64, use a syntax

formats

Combine apt-get update and apt-get upgrade in one command

Published on August 1, 2012, by + in linux, sysadmin.

Combine apt-get update and apt-get upgrade in one command | On Ubuntu or Debian, it is possible to make a small bash one-liner to fully update the host with one simple command. I’ll show you how! 1. Create a file called ‘update’ in /usr/local/bin: $ sudo nano /usr/local/bin/update 2. Type the following for the file contents, then save with Control+X. #!/bin/bash sudo apt-get update &&

formats

cURL Ignore SSL Certificate Warnings

Published on February 14, 2012, by + in linux, osx.

cURL Ignore SSL Certificate Warnings | To ignore any ssl certificate warnings with curl, use the tack k option. Here is an example: $ curl -k https://scottlinux.com $ curl -I -k https://scottlinux.com HTTP/1.1 200 OK Date: Tue, 14 Feb 2012 20:00:03 GMT Server: Apache Strict-Transport-Security: max-age=43200; includeSubDomains X-Frame-Options: SAMEORIGIN Set-Cookie: bb2_screener_=1329249603+66.202.152.198; path=/ X-Pingback: http://scottlinux.com/xmlrpc.php Set-Cookie: PHPSESSID=lq5dpvfagbdstib7nlg2b8a0m7; path=/ X-Hello: Hello There Vary:

formats

Quick Intro to zsh: auto complete

Quick Intro to zsh: auto complete | zsh or the z shell is an interactive shell that builds upon features of other shells such as bash, ksh, and tcsh. zsh is great for advanced script monkeys but also is an excellent simple bash replacement for the regular joe user. Here is a quick intro to the auto complete features of zsh! On

formats

Create Animated GIF in Linux from Command Line

Published on July 31, 2011, by + in linux.

Create Animated GIF in Linux from Command Line | Imagemagick can easily make an animated gif from existing images with a simple command. I’ll show you how! First, install imagemagick: $ sudo apt-get install imagemagick Next, gather all of your .jpg images together in a single folder or directory. If needed, date/name files in a numbered or sequential order. The manor in which they

formats

/usr/bin/mint-fortune: line 35: [: ==: unary operator expected

Published on May 29, 2011, by + in linux.

/usr/bin/mint-fortune: line 35: [: ==: unary operator expected | In Linux Mint Debian Edition, a recent update made the fortune script stop working. I’ll show you how to fix it! 1. Open this file with nano, or your favorite editor: sudo nano /usr/bin/mint-fortune 2. Locate line 35 which looks like this: if [ $showfortunes == "true" ]; then (Tip: in nano, press Control+C to

formats

Bash Tips – Return to Previous Location

Published on May 1, 2011, by + in linux, osx, sysadmin.

Bash Tips – Return to Previous Location | Ok this is a quick one, but useful! To return to the previous working directory, simply type: cd – and hit enter. Cool!

Home Posts tagged "bash"