Executing different files in OpenSuse

No Comments »

Whatever i type here, i assume that you have changed to that directory (if necessary) using “cd {path}” (w/o dowble quotes and brackets) command and u should always be logged in as root using “su -” (w/o double quotes) command.

There might be other ways to execute these files, but i have used these and found these only when i searched for the same over the net.

Also always read the README file, if provided with the package.

1) .sh (Script) files

Simply click on them to execute them, works sometimes.
or
Open Terminal
type ./scriptname.sh
or
Open Terminal
chmod -x scriptname.sh
sh ./scriptname.sh


2) .py (python) Files

Open Terminal
type python filename.py


3)Java Files

Open Terminal
type ./filename


4)tar.gz Files (Archives)

Simply extract them with an Extractor by clicking on them (as in windows)
or
Open Terminal
type tar xvzf file.tgzNote: To extract to some other folder, change over to that folder and then type
tar xvzf {path}.tgz
path of the file w/o brackets


5) Making an Install File from the package u downloaded

Extract the contents
Open Terminal
Type: ./configure
then: make
then: make install


6) .rpm Files

Right Click on them, and then selct Install with Yast
Note: Choosing Install Software never worked for me..

That should be enough!!

Some Unix Tricks

No Comments »

These are some unix tips that might be helpful someday down the road. Feel free to contribute more unix tips by commenting on this article.

Becoming yourself from someone else’s login
su <yourID> will retain the previous person’s environment, a good way to go from your ID to root
su - <yourID> (note the dash) will read all your dot files and land you in your home, just like a real login

Core files
I assume hardly anyone looks at core files, but they are generated more often than we like and can be HUGE! On the top of your .cshrc add: limit coredumpsize 0k Remove any other lines that specify similar stuff. If there is a really hairy software problem, I will ask you to edit this line and deliver the ressulting core file to me, but it hasn’t happened yet.

You can also create a crontab for yourself to do some regular housekeeping for you:
On SUN:
setenv EDITOR vi
crontab -e
lands you in vi with your crontab file loaded, if one exists; get into append or insert mode and type:
# remove all my core files daily
05 23 * * * find ~ -name core -exec rm -f {} \;
Exit vi the usual way. This searches your home area for core files at 11:05 pm everyday and removes all of them.
On SGI: create a file with the above lines, then type: crontab This second method works on SUNs also.

Disk space
If there is not much space on your machine and you wonder why (and you know that you are not directly the culprit!): Check the /var partition for large files. (You may need to be root.) du -k /var (SunOS 4.1.x does not know the option -k!) It should be obvious in which directory very large files are hiding. Some machines have a /var/crash area that holds dumps from crashes. If research computing hasn’t requested them from you for inspection, these may go. Also, large LOG files may be truncated to conserve space. If you had any trouble recently check with me or someone knowledgeable before you remove any log info. If these files are large, there may be a good reason for it!

Cut and paste text files by columns
How many times have you wanted to edit those results files columnwise? Here’s a generic UNIX way: (startcol and endcol refer to character columns, including whitespace. Tab counts as 1.)
cut -cstartcol-endcol file {>receiving file} paste sourcefile1 sourcefile2 {>final file}
I like to preview and fine-tune my commands by looking at the result on standard out (the shell window) and then redirecting output to a (temporary) file when things look right. Those feeling really adventurous can combine things into a single command line…

File compression
Probably everyone is using compress to conserve disk space and/or net bandwidth. While compress has its merits, mainly that its efficient and available on nearly all UNIXes, it has NO consistency checks. And there are even more efficient tools today: Under /tsri/gnu/sun4/bin you’ll find gzip. Gzip and its companions gunzip, gzcat, gzmore, gzgrep (and so on) will work with files compressed with gzip, compress, pack and zip (the UNIX variant of PKZIP, perhaps it can handle PC files?). I have used gzip successfully for the last two years and SGI now ships it as part of their systems. That should speak for itself. Gzip compressed files end with .gz. To get at gzip, edit your .cshrc:

set path = ( /tsri/gnu/sun4/bin $path )
setenv MANPATH $MANPATH:/tsri/gnu/man
setenv GZIP “<whatever>” (check gzip -h for available options)

On SGIs do nothing. gzip is already in your path.

Gzip can work through directory trees: gzip -r -9 <some dir> will compress every file it find starting from downwards. The -9 switch specifies best compression at the expense of speed. Great for archiving.

For very efficient compression of some directory and its contents:
tar cvf - dir | gzip -9 > dir.tar.gz

To uncompress: gzcat dir.tar.gz | tar xvf -

Renaming a group of files
Suppose you have a group of files, named file_jan.1, file_jan.2, file_jan.3, etc. and you want to rename them to something like experiment_1_jan.txt, experiment_2_jan.txt, experiment_2_jan.txt, etc.

Use a script like this:

#!/bin/csh -f
foreach x ( file_jan.* )
mv $x experiment_$x:e_jan.txt
end

Ubuntu 8.04 Released

No Comments »

I have been waiting to get my hands on this release of Ubuntu. I got up this morning and went to the Ubuntu site.This Site is Temporarily Unavailable

It was that way until the afternoon. At the rate my download is going, the 700 MB file should be ready tomorrow when I get up. I will install it tomorrow and have the weekend to mess around with it. Most people downloading it will probably do the same. In a month, all of us will still be using what we were using yesterday.

I have never understood all the bickering over operating systems. I remember a Slashdot article from last month where someone asked the only important question that should be asked.

What does (another OS) do that (my OS) doesn’t do?

Fill those names in with whatever you like. The list of features unique to one operating system is short.

I run them all. I have to have access to the same programs my students use and my online students can choose to run any operating system. Mainly they run Windows, but some run OS X. I have yet to have a student that uses Linux as a desktop OS either at home or at school.

Just for the record, I have never purchased an operating system. I use what comes on my computers. My main OS right now is Windows Vista. I run Home Premium on my desktop and Ultimate on my laptop. My MAC has 10.4 and my iPod Touch runs some version of OS X. The rest of the family runs XP Pro. We all use IE as our main browser. All the machines have the free version of AVG anti-virus except for my machines. I don’t run anti-virus software on my personal machines. We don’t run anti-spyware software on any of our computers.

We don’t have spyware and have never had a virus. I have been using a computer for twenty years and I have never had a virus.

Here are most of the things we do on the computers in our house:

  1. Browse web pages and read email
  2. Create and organize documents, spreadsheets and presentations
  3. Create and query databases
  4. Schedule work and family activities
  5. Draw pictures
  6. Manipulate photographs
  7. Digitize and watch videos
  8. Create and listen to audio files
  9. Play games

I am back to the question that no one ever asks. What OS can’t do these things?

Until someone creates an OS that has useful functionality that no other OS has, we will all probably continue to use what we have. That’s why the version of Ubuntu I’m downloading right now won’t change much.

Open Office Extensions

No Comments »

Open Office recently pushed 3.0 as a beta release.It’s a bit slower the 2.4, it’s got a nice new start centre, an icon refresh, a zoom control on the status bar and is now capable of supporting extensions to increase functionality.

To be honest I can’t say there are a great many useful downloads available at the moment, but some of them would be pretty handy if you use Open Office on a regular basis:

Professional Template Pack
A collection of elements to create your own professional style templates for documents, forms and presentations

Sun Web Blog Publisher
Microsoft Word 2007 comes with some impressive blogging capabilities, but now Writer can too. This extension supports “many popular blog services’”, so having not used it I can’t guarantee it’ll work for yours, but give it a try and see.

GoogleDocs to Open Office.
This works for both Google Docs and Zoho and can import and export your documents and presentations between Open Office and thestwo online services.

Oxygen Office Gallery Extras
A compilation of clip art and templates for your documents. Comes with multiple languages and with some other extras.

Pagination
A simple little dialogue to insert page numbers, works with all localizations.

Crop Images
Crop images in Draw and Impress with this add-on.

Writer’s Tools
If you live in Writer during the day, churning out documents or whatever it is you do then this pack will provide you with all the extra functions and features necessary. There are some pretty useless additions to this set, but some notable tools are:

  • Lookup Tool
  • Email Backup
  • Remote Backup
  • Start/Stop Timer
  • Add to Basket
  • miniInvoices

Test Fonts
This seems pretty handy, it searches for all the fonts contained in the document on your system. It then reports on missing fonts, all used fonts and gives statistics on available fonts.