Monday, May 24, 2010

What skills will I need before I start to learn Unix?

I know some C and C++ programming already.


What other background will I need to have?





Also, whats so special about Unix? Why are so many people using it?

What skills will I need before I start to learn Unix?
learn unix shell scripting. It will come in handy. For that matter, general programming knowledge can be useful, but you don't need it to learn how to use Unix. Unix, after all, is simply an operating system. As for your second question, the most common usage for Unix and Linux is as a server because it is ostensibly more stable than Windows boxes.
Reply:Jeff G. is right about shell scripting, but I would start by learning all of the command line commands. When I work in Unix (or Linux for that matter), I keep O'Reilly's Linux Pocket Guide (ISBN 0-596-00628-4 it lists for $9.95, but I think I got it for 7.95 at B%26amp;N) right next to me. There are a lot of commands you need to learn to do anything basic -- like log on and run a program.





Unix/Linux is not hard, it is just different. It is an older OS that originated in the 1970s. It was originally for big machines (there were no PCs), but Linux allows a Unix-like OS for the PC. Linux is inexpensive (most distributions are free), and it works very well on servers.





If you are going to write code on a Linux box, you will need to learn Eclipse (I assume you will be able to use a real IDE and not have to use vi for everything), gcc/g++ (compiler), and gdb (debugger).
Reply:Learn the shell commands to get going, get comfortable with command apps such as grep.


Learn the architecture and structure of UNIX (everything from folders to networking)


Learn how to write apps for UNIX in C/C++





Many people use it because it offers great flexibility and you own and can modify everything. Ownership and knowledge of everything in UNIX is what makes it appealing to programmers. Also, it is free, faster and has been known to be more stable and secure than Windows, although MS is doing a much better job with Windows nowadays.





Once you get comfortable with the keyboard in UNIX, you will realize how much time mouse navigations and clicks often waste.


How do you put a file in a file in UNIX. Ex. In directory Water project is file menu, and in file menu...?

How do you put a file in a file in UNIX. Ex. In directory Water Project is file Menu, and in file Menu is files Add, Remove, and modify? I only know how to put files in directories.





Also is there a command to make a file specifically a date file and not just a text file, i.e $%26gt; vi filename.

How do you put a file in a file in UNIX. Ex. In directory Water project is file menu, and in file menu...?
Not sure exactly what you mean. If you simply want to concatenate three text files named Add, Remove and modify and put the result in a file called Menu, you can use "cat Add Remove modify %26gt;Menu".





If you want to archive and compress them like with zip files on windows, you can use the tar command:





tar -zcvf Menu.tar.gz Add Remove modify





Then to extract them again:





tar -zxvf Menu.tar.gz





Regarding the command to make a file a 'date' file rather than just a text file, I can't really help since I don't know what you mean by a 'date' file.





But ls -l will list files in a way that shows their last modification time/date if you mean that.
Reply:If I understand your question right, you want to create a subdirectory. Generally in the "Save As" dialog, there will be an option for creating a new subdirectory (folder) and then you can put the file in there.





I am not sure what you mean by a date file. You can use the touch command to create an empty file which will have a datestamp of when you ran the command. You can then see the date using "ls -l"





I hope this helps

mothers day cards

How to set permanent environment variables from shell script in UNIX?

I have a UNIX shell script that needs to set environment variables, and those variables need to be available permanently after finishing the script execution. I searched a lot for a resolution with no luck!.





How can I do that?

How to set permanent environment variables from shell script in UNIX?
1) You CAN use .profile file under your home directory.





2) You can set the environment variables in:





If you are using ksh ( Korn Shell ) , then in .kshrc


csh ( C Shell ) , then in .cshrc





3) Use appropriate commands for different shells:


set or setenv ( within the .profile or .kshrc or .cshrc )





4) If its different shell ( for eg. bash , tcsh , etc ; then check the


man pages =%26gt; $man tcsh )





5) You may also check these files: .login


.logout








hth





VETRI





Software Engineering Consultant - ( IBM Rational Tools %26amp; Open Source Tools)





Global Software Engineering ( GSE )


Singapore





Vetri AT Global-Software-Engineering DOT com
Reply:chekc the .profile file in u home directory.


or for temporary purpose u can use export command


How can I create and manipulate an application object using Java in UNIX?

Yes, big question, but I really am looking for the UNIX equivalent of a Windows JScript that does the following (for example only, I realized I can't call a Microsoft application on UNIX)....





var objwd=new ActiveXObject("word.application");


objwd.visible=false;


objwd.Documents.open("blah");





...





Again, obviously the example above is a Windows-application specific example only. What I'm looking to do is merely emulate a similar concept except using Java (or Perl would be fine too, but I have so little knowledge of either). I want to create an object reference to a particular UNIX-installed application and then manipulate the object with the permissible methods associated with that object. I'm fairly familiar with the way to do this in Windows Scripting, but am quite new to UNIX and am trying to learn the various analygous scripting methods there. Any help (especially code samples) would be much appreciated.

How can I create and manipulate an application object using Java in UNIX?
Well first off, you don't really have COM (you can get emulators) on UNIX systems so you need to work directly with the applications and their APIs to interact with them. If you are looking to do this from Java, you would create your application using the jar file containing APIs from the application you are trying to launch. You could also see if a command line version exist for simple things like trying to open an executable, like "/opt/myapp/app.exe somefile.txt".





For many of the scripting tasks, you can generally find good examples in /etc/rc2.d for starting up applications (similar to what Microsoft services does but without the complexity of actually registering a service...you can just create a startup script and place it in there with a start number for sequence). Of course if you are running a UNIX system like Solaris 10, you do get Service Management Framework (SMF) that offers the features of dependencies and parallel start. I'm not sure if any of the Linux distros have a similar capability or not.





** Edit **


Are you looking to do this for a particular application then? I have plenty of Solaris experience going from Sun OpenWindows 4.x and Solaris 2.5 through Solaris 10. For better or worse (depends who you ask), you won't find VBA like references available on Solaris.


Should I start learning Unix or Linux??

I want to become a linux or unix administrator. Where should I start? How many hours per day? Should I pass a certification?


Buy books?

Should I start learning Unix or Linux??
if you're in it for the money go with UNIX. More money. Get Certs and books!
Reply:most companies have Microsoft or sometimes mac, i would go with one of thought (i proffer Microsoft)
Reply:I say both. Best bet is to go to school. Check your local Community College for IT, Computer Networking, Network Admin type programs. They general train you right to certification and in a broad spectrum of systems and hardware.





AAS Computer Networking, ISP Help Desk Tech(graduated in dec and job hunting)


Thanks people for the help with the unix in VM?

Ok now stupid question, I'm using this as a practice lab, so i need for the command line to be similar to sun microsystems unix (learning purposes) so does ubuntu have a command line that is similar or the same to unix?

Thanks people for the help with the unix in VM?
yes, since ubuntu is linux distribution and Linuix is unix clone.
Reply:Yes. Just open a terminal window. Applications %26gt; Accessories %26gt; Terminal You will get the $ prompt.
Reply:LoL


the graphical interface is just a coat over the unix command line,


you can acces the command line by using alt + F2

hide song

Printed Copy of Linux/Unix Man pages?

A couple of years ago I forget the URL of a site that sells the printed Linux?/Unix man pages in (i think spiral bounded)? Does anyone know if that site still exists?

Printed Copy of Linux/Unix Man pages?
Hrm ... Hate to answer a question with another but why would you wanted a printed copy of man pages? From my experience, so many man pages are out of date and incomplete. Just print the ones your want.