junk food for the brain …
How to upload files to a FTP server using curl
A simple tip for anyone, uploading files using the curl command line tool.
curl -T filename.ext -u username:password ftp://ftpserver.com
The command explained:
-TThe switch that tells curl this is a transfer-uYour username and password, seperated by a colon. ‘:’
No comments yet.
No trackbacks yet.
Generate Files with Random Content and Size in Bash
July 29, 2009 - 12:37 am
Tags: bash, dd, files, generate, How To, Linux, random, script
Posted in How To, Linux | No comments
Occasionally you need to generate a bunch of random files with random content, usually for testing compression, user quotas or miscellaneous stuff.
Here’s one way, using the bash shell and a few handy linux utilities.
The bash $RANDOM function. It generates a random number between 0 – 32767.
Linux DD utility, to output files.
/dev/(h|s)da, your hard drive in [...]
How to Enable Flash in Google Chrome for Fedora 11 i686
July 27, 2009 - 11:45 pm
Tags: chrome, fedora, fedora 11, flash, flash-plugin, How To, install
Posted in How To, Linux | 4 comments
So you’ve installed the latest development builds of Chromium for Fedora Linux. The only thing lacking is that youtube is not loading. If not, what are you waiting for? Refer to one of my previous posts.
First make sure you install the Adobe yum repository.
As root:-
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
Then install the flash plugin.
yum install flash-plugin.i386
The flash plugin [...]
Configure a Caching-Only Name Server in a Chroot Environment for Fedora 11
July 18, 2009 - 8:39 pm
Tags: bind, caching-nameserver, caching-only, chroot, fedora, fedora 11, How To, Linux, named, nameserver
Posted in How To, Linux | 5 comments
Having a caching only name-server on your local Machine speeds up your browsing. Here’s how to set up a slightly more secure caching server using ISC Bind in Fedora 11.
Install bind and bind-chroot packages
# yum install bind bind-chroot
Edit your /etc/sysconfig/named file.
# vim /etc/sysconfig/named
Add the following line:
ROOTDIR="/var/named/chroot"
Edit your /etc/named.conf file.
# vim /etc/named.conf
Change the following line:
listen-on port [...]
Change Your MAC Address in Linux
July 16, 2009 - 4:38 pm
Tags: address, ethernet, how, How To, hwaddr, ifconfig, Linux, mac
Posted in Misc | 1 comment
Some times it necessary to change your network MAC address on your linux box.
Unlike Windows, which requires some registry editing or even specialized tools, its just a command line away in Linux.
For example, lets change the MAC address of your first netwrok card, usually called eth0.
Let’s swith to being the root user and view the [...]
Check Your Spelling in Linux using the Command Line
July 15, 2009 - 3:51 pm
Tags: aspell, cli, How To, ispell, Linux, spell check, spellcheck
Posted in Misc | No comments
You can do a spell check on from the command line in Linux.
First, make sure you have aspell installed. In Fedora, just yum install it.
$ yum install aspell
You’ll also need a dictionary, from which aspell can search for words.
A yum search aspell will give you a list.
[raja@atreides visilon]$ yum search aspell
———————————————————–
aspell-af.i586 : Afrikaans dictionaries [...]
How to Mass Rename Files in Linux
July 12, 2009 - 10:12 pm
Tags: bash, cli, files, How To, Linux, mass rename, rename, script, scripting, sed
Posted in How To, Linux | 2 comments
When entrusted with the chore of renaming multiple file, the convenience of a script shines. After all, we ain’t robots designed to do just one thing. Today, I’ll show one method of renaming files, using a for loop in bash.
First, the task we are going to do:
We have a list of files:
[raja@atreides test]$ ls
data_file_1 [...]
VirtualBox 3.0.2 released!
July 11, 2009 - 10:30 am
Tags: Linux, ubuntu, virtualbox, virtualbox 3.0.2
Posted in Linux, Tech | No comments
VirtualBox 3.0.2 has been released. This is a maintenance release, but it solves a lot of problems. For example, 3D accleration works way better now if you have Desktop Effects enabled. A definite recommended upgrade.
How to install a Dynamic DNS client for Fedora Linux
July 10, 2009 - 10:56 pm
Tags: dns, dynamic dns, dyndns, fedora, How To, inadyn, Linux
Posted in How To, Linux | No comments
Many people use dynamic dns for different purposes. I use it to give my home machine a public presence. I choose DynDNS for my needs. Its a leader in this segment and have been around for a long time.
First, you’ll need to register for a free account at their site. Once you’ve chosen a domain [...]
How to enable the Windows Key in Linux
July 10, 2009 - 7:55 pm
Tags: fedora, gnome, keyboard, Linux, shortcuts, windows key
Posted in How To, Linux | No comments
After installing Fedora, or most linuxes, you may realise that the Windows key that you used during the unenlightened days doesnt work anymore. Even worse, you cannot seem to use it as part of you Keyboard shortcuts. Gives some weird irony when reading about Dead Keys.
Enabling the Windows Key is easy, Just go to System [...]
How to print usernames with a userid greater than 500
Occasionally, you need to print out a list of usernames, greater than a certain user id. This is usually useful an a slightly larger setup, or when you want to chain more commands to certain users.
Use the awk command.
awk -F":" ‘ $3 > 200 {print $1} ‘ /etc/passwd