LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Where can I get tutorials or tips in doing stuff with fedoras terminal? (https://www.linuxquestions.org/questions/linux-general-1/where-can-i-get-tutorials-or-tips-in-doing-stuff-with-fedoras-terminal-653432/)

windowsNilo 07-03-2008 07:19 PM

Where can I get tutorials or tips in doing stuff with fedoras terminal?
 
Im very sorry for double posting
the last time, I was having a
hard time where to post it so I
made a double post.

If I am right, the terminal is
somewhat the cmd of windows?
Can anyone help me again
about a batch file for windows
into that for fedora?
==========================
@echo off
cd C:\Documents and Settings\....
set path=%path%;C:\j2sdk.....
javac Sample.java
java Sample
pause
==========================

The last thread I post was
removed because I double posted.
Sorry :0

CJ Chitwood 07-03-2008 09:27 PM

Quote:

Originally Posted by windowsNilo (Post 3203404)
Im very sorry for double posting
If I am right, the terminal is
somewhat the cmd of windows?

That is the closest analogy, yes. However, there are differences that make the analogy invalid. For the sake of general discussion though, you are correct.


Quote:

Can anyone help me again
about a batch file for windows
into that for fedora?
==========================
@echo off
cd C:\Documents and Settings\....
set path=%path%;C:\j2sdk.....
javac Sample.java
java Sample
pause
==========================

The last thread I post was
removed because I double posted.
Sorry :0
Not sure about echo off. I think that when you make a text file executable (the Linux equivalent to "rename runme.txt runme.bat") that it will by default NOT echo your commands. To make it executable, the quick dirty way is with
Code:

chmod +x <filename>
set path=%path%; etc.; becomes
Code:

export PATH=$PATH:/any/others:/you/may/want
NOTE THE DIFFERENCES: colon in Linux, semicolon in Windows. Also, case is sensitive, so "PATH" does NOT equal "path".

java commands are the same. Remember that filenames ARE case-sensitive.

There is no pause in Linux. You won't need it anyway in this context, as I don't believe it will continue in the script until Java finishes running Sample. It's possible, however, to write a quick C program that waits for the Enter key, then compile it, and store it in /usr/local/bin as "pause" with the X bit set (chmod +x /usr/bin/pause).

Come to think of it, there is a way to wait for keyboard input on the command line... I think you have to set a variable but pipe input from CON... I'll let a more expert person handle this one....


Hope this helped!

CJ Chitwood 07-03-2008 09:30 PM

Oh, oops...

I skipped one part...

In Windows, there is C:\Documents and Settings\username\all_your_stuff.here
In Linux, there is /home/username/all_your_stuff.here.

cd command is almost identical: cd "\documents and settings\username" becomes "cd /home/username". An even easier way is "cd ~", or, just plain "cd" by itself on the command line with no arguments will bring you to ~ (~ is a shortcut for "/home/whoeverIam").

Cheers, HIH

windowsNilo 07-04-2008 08:38 AM

Nice. Thank you sir!
One more thing though,
in windows, I save it
as "filename.bat", how
do I do it in fedora?

pixellany 07-04-2008 09:02 AM

It's time for a book....

I recommend:
"Linux in a Nutshell" from O'Reilly. (They may have it free online now.)
"Bash Guide for Beginners" by Machtelt Garrels. (Free at http://tldp.org)

To save a script file in Linux (Bash), you don't need an extension. Give it any name you want, and change the permissions to executable.

CJ Chitwood 07-04-2008 10:17 AM

Quote:

Originally Posted by pixellany (Post 3203964)
It's time for a book....

I recommend:
"Linux in a Nutshell" from O'Reilly. (They may have it free online now.)
"Bash Guide for Beginners" by Machtelt Garrels. (Free at http://tldp.org)

To save a script file in Linux (Bash), you don't need an extension. Give it any name you want, and change the permissions to executable.

I'll second the "Linux in a Nutshell". I'm not able to find a free version online, although I have seen older editions of some of their books online free in full text.

However, I do highly recommend the book, even if you have to go buy it. It helped me out quite a bit early on, although I have to admit I haven't touched it in a year or three except to move it from one shelf to the other.

An alternative is The Linux Documentation Project. When I was starting out, that site was one of my most-often-hit in my bookmarks. Again, I haven't used it much at all lately, but it was a great help for me and it's a plethora of information.

On TLDP, there is a Linux System Administrator's Guide. It may not be the LiaN recommended above, but it's still an excellent read if you're wanting to learn more about the system you have in front of you.

HIH and Cheers!

CJ

CJ Chitwood 07-04-2008 10:21 AM

Oh, and one more tool that seems to be little-known (at least, among the Windows world) is Google. But not just any Google... oh, no... go to the "Advanced Search" link and look to the very bottom of the page. You'll see that Google has topic-specific searches on Linux, Mac, Microsoft, BSD, and I think one other... You can use any of these searches to limit your results to just that platform. For example, type "firewall" in regular google and all sorts of hits will come up from Norton to McAffee to everything else... but, go to the Linux specific search, and you'll get hits like GuardDog, Firestarter, iptables...

http://www.google.com/linux

Also, if you type something into regular google, and you realize you want Linux instead, just look at your URL... it will be "google.com/search?" followed by code. Change "search" to "linux" and you'll be set.

Really hope it helps...

windowsNilo 07-05-2008 07:19 PM

Thanks a lot for everything!

I have another question,
will it cause me any
problem in the future
if I install 2 OS's in
my pc?? I really wanna
try out using fedora on
our pc but my pops wont
allow me because he's
already used to windows.
Im planing to install
fedora on another partition
and everytime my pops
uses the pc, he can use
windows.

pixellany 07-06-2008 04:47 AM

Why the short lines? (Makes reading difficult)

You can install many different OSes on one computer. I have 8 at the moment---search here for Saikee: He has something like 100.

With something like Fedora, the installer will detect Windows and automatically set up the GRUB menu.

Before doing anything like this, be sure that any important files are backed up, and be sure that you have a way of re-installing Windows----"just in case".

chrism01 07-08-2008 09:24 PM

Another good tutorial: http://rute.2038bug.com/index.html.gz - very good


All times are GMT -5. The time now is 08:08 AM.