Tuesday, May 27, 2008

Basic Unix Commands

Some commands were practiced in the lab. So since this is just for future brush up during interviews it will have only extra features, basic features I have to try and remember.

Very effective:
  • chmod - changes permission for directories/files. eg: chmod ugo+r+w+x filename - gives u-user,g-group,o-others the permission to read(r),write(w) and execute(x). For directory, execute permission is required.
  • ls - list files in the directory. The options most commonly used are -l which is to print file list with permissions, time modified, user details and the other option -a prints all files including the . and .. directories.
  • ff - find files. This command is used to search for a file throughout all available directories.
  • diff - The command which is really unique to unix. This command compares the two files and prints the differences with line numbers.
  • | - pipe. This allows commands to be combined.
Very Basic:
  • cp - copy command. This copies file from one location/one name to other location/another name.
  • mv - move command. This moves/changes file location or name respectively. One had to be careful, 'cause this results in deletion of the original file.
  • cd - change directory. When typed with no argument, it takes to home directory.
  • pwd - current working directory.
  • wc - word count. The order is lines,words and characters.
  • gzip & gunzip - compression/decompression of files.
  • finger - cmd to print details about user. Finger protocol (network).
  • telnet, ftp, rlogin - used for connecting to outer hosts.
  • kill - kills process forcibly
  • ps - lists the process run by you.
  • du - prints disk usuage.

Monday, May 19, 2008

Placement Preparation

Phew!!!! Exams are over, now starts the amazing race towards my own cubicle somewhere in a company. For starters, its placement preparation time. Right now I am enjoying and also studying which is a lethal combination.With this introduction, I am going to blog down all my materials for later references. First day, we are starting with Algorithms.



When we say algorithm, we have tons for everything.So I am going to start learning the basic algorithms first. I am reading from planetmath.org. Its really good. So much technicality and maths are there.

Today(day 1) I read about selection sort,binary search,insertion sort,bubble sort.