Tuesday, January 16, 2007

The Gizmo Project and Wildcards

Hi everyone!!

Sorry for the short podcast, just too many things going on this past week. This week I introduce you to the Gizmo Project which is another Voip product similar to Skype. The reason why I like it is the free voicemail feature that they offer you. Also, it gives you and option to record your conversations easily for free!!! For a podcaster that is valuable. This was supposed to be the first installment of the linux equivalent segment, but I was just too excited to tell you about this to offer a real "equivalent". Yes I know Skype is available for linux but I think gizmo is a good alternative to Skype. I am astounded by its feature set that they offer for free. I'll try harder next time to get out a better windows equivalent package.

I also explore wildcards. You may be already familiar with the asterisk (*) which can represent any number of characters. Below is a list of wildcards and proper syntax. Enjoy!!

The asterisk (*) - used for any number of characters. It can be used like this:

ls *.txt

This will list all the text files in the current directory.

The question mark (?) - used to denote a single character. It can be used like this:

ls p12000??.png

This will list all png files (it's a graphics file good for websites) that start with p12000 as shown before the question marks, but the question marks are a place holder for any character at the position where the wildcard is placed.

If you wanted to find a file which contains a letter or number form a specific subset you could use the square brackets, []. For example:

rm fresh[k,x]ubuntu.txt

This will, of course, remove any text file freshkubuntu or freshxubuntu. But why would you want to do that??

You can also use the brackets for contigiuous sets of letters or numeral, such as, a-b, or 1-9. This is shown below:

copy vacation[a-c]200[0-6].* /home/harlem

As you can see, wildcards can be mixed to give even greater flexability to your commands. Now don't fall asleep on me, I just have a couple more to go!

You can also use the brackets to limit your search by eliminating letters that a file does not contain by introducing an exclamation point after the first bracket and before the first letter, like:

ls [!fresh].pdf

This command will only show files that do not contain the LETTERS f, r, e, s, h, and inadvertently the word fresh. You can do the same to a range of letters, such as, a-w.

What if you wanted to search for a file that has a specific word in it? Well, you would use curly brackets, {}. Its not apparently intuitive, what with all the square ones dominantly in use. For example:

mv {fresh,ubuntu,is,the,best,podcast,ever} /home/toptenondigg

This finds files with the words in the given subset and moves it to the appropraite directory.

Note - These wildcards can be used with a number of commands, not just the ones listed here. Remember, use caution when moving things around with wildcards. Just be safe and if you are at all unsure about what you are doing stop and think about it. That's it for now, see you next week.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home