LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2008, 04:30 AM   #1
allan_bg
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Rep: Reputation: 0
How can I run a command in some directory?


How can I run a command in some directory...??? Where I should type a command? I don't understand.
 
Old 02-05-2008, 04:32 AM   #2
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 30
if your running X open a terminal
then you're in a shell
in redhat based systems it's common shell would be the /bin/bash
 
Old 02-05-2008, 04:32 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You probably need to open a terminal to run the command if you are in a window like environment at present.

What distribution do you run?
 
Old 02-05-2008, 04:39 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
If the command is in the same directory, precede the command name with "./". If you are in a different directory, precede the command with the path to the command which could be an absolute path or a relative path:
../directory/command
./command
/home/username/bin/command

Sometimes the command might expect you to be in the same directory as the command. One example is alienarena2007:
cd /usr/share/games/alienarena2007
./crx

Last edited by jschiwal; 02-05-2008 at 04:41 AM.
 
Old 02-05-2008, 04:40 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Somewhere in your menus, you will find "terminal" or something similar. This gives what is sometimes called a "command-line interface" (CLI). Until the early 80s, this was the most common way of interacting with computers.

Once you learn it, you will discover that it is often faster and easier than mousing.
 
Old 02-05-2008, 04:48 AM   #6
allan_bg
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
I tried to run fortran 77. I spent five days already and I didn't have a result. I visited forum and got a lot of instructions but nothing works. Probably I made a mistake at the beginning with download rpm package in home directory. I don't understand what is source code, also. You can see my confuse with this problem if you find my messages...
I don't wont to waste your time again. Anyway, if you can give me the whole procedure, stet by step, it probably could help me.
 
Old 02-05-2008, 05:24 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
On my system (PCLinuxOS) Fortran is available using the package manager. (No need to install rpms, etc.)

Please tell us what version (distribution) of Linux you are using.

I assume that your original question (how to enter commands) has been answered.....
 
Old 02-05-2008, 05:43 AM   #8
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Lemme get this straight, You want to run fortran compiler but you don't know what a source code is?
 
Old 02-05-2008, 11:37 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Please put your distro and version in your LQ Profile. The instructions on using your packaging system will vary according to your distro. If I remember correctly you are using SuSE, but I don't know which version.

Is there a reason it has to be Fortran 77? On SuSE 10.3 there is no g77-compat package available, and the -std options are f95, f2003, gnu, or legacy. See the manpage if Legacy would be good enough. There is an option to produce object files compatible with c77. (-ff2c).

If you can enter "which g77" and it is available, then I don't understand what the problem is. If with the -compat package installed gfortran includes a -std f77, then you would compile a program with "gcc -std g77" ...

Also look in the gfortran info page:
Quote:
1.3 GNU Fortran and G77
=======================

The GNU Fortran compiler is the successor to `g77', the Fortran 77
front end included in GCC prior to version 4. It is an entirely new
program that has been designed to provide Fortran 95 support and
extensibility for future Fortran language standards, as well as
providing backwards compatibility for Fortran 77 and nearly all of the
GNU language extensions supported by `g77'.
Quote:
1.5 Standards
=============

The GNU Fortran compiler implements ISO/IEC 1539:1997 (Fortran 95). As
such, it can also compile essentially all standard-compliant Fortran 90
and Fortran 77 programs. It also supports the ISO/IEC TR-15581
enhancements to allocatable arrays, and the OpenMP Application Program
Interface v2.5 (http://www.openmp.org/drupal/mp-documents/spec25.pdf)
specification.

In the future, the GNU Fortran compiler may also support other
standard variants of and extensions to the Fortran language. These
include ISO/IEC 1539-1:2004 (Fortran 2003).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell: command not found / Runs fine with "Run command" badbunny Linux - Newbie 1 01-22-2007 01:21 AM
Cannot run an executable in current directory even using ./ iknight Linux - Newbie 10 08-12-2006 12:27 PM
chroot: cannot run command `/tools/bin/env': No such file or directory Basel Linux From Scratch 5 06-30-2006 03:00 AM
Command to run another command against a list of files psweetma Linux - General 3 11-09-2005 05:29 PM
How do I run a command in script from a particular directory? davee Linux - Newbie 1 08-07-2003 03:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration