Opening a file from the terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Opening a file from the terminal
# 1  
Old 07-27-2006
Opening a file from the terminal

Hi, this is such a simple question (I think), but I don't know the answer, obviously. If I'm using the terminal, and I'm remotely logged on to another computer, and I'm in my directory on that computer, what command would I use to...open a file? For example, a .exe file, or a .txt file...all I want to do is open the file.

Thanks in advance,
Dan
# 2  
Old 07-27-2006
I am doubtful if i understood you.but lets try there are many commands to open a file you can try that

cat filename

if that file is in some other directory then you need to give path
cat /directorypath/filename
# 3  
Old 07-27-2006
Hi
assuming you want to 'open' it to look at it - I guess you would use the commands/utilities available on the remote computer. So, if its a text file - any text editor would do (eg vi, emacs, joe) - if its a binary file you could use a HEX editor to look at the code - alternatively a debugger . It all depends on exactly what you want to do and what O/S your running also.

If you want to open it as in execute - usually the file is prefixed ./ so to run the file foo you would need to type ./foo (the file foo also needs to be executable)

good luck!
# 4  
Old 07-27-2006
Well, cat filename works to present a file's contents to me in the terminal. What I really want is to be able to open a .exe file (I.e. to run a program) from the terminal. For example, on a PC, I would doubleclick on something like "microsoftword.exe", and Microsoft Word would open. If I have "microsoftword.exe" on a UNIX computer, and I want to open Microsoft Word from the terminal, how would I do that?
# 5  
Old 07-27-2006
Sorry for double-post, but I just thought of something. I might actually have the wrong version of the program I want on my computer. How would I determine what type of UNIX or Solaris or whatever it's called that I am running?
# 6  
Old 07-27-2006
uname -a
will give you details of your OS.

IF you want in detail level use
uname -X
# 7  
Old 07-27-2006
Alright then, I guess that brings me to my next question. First, my OS details are:

SunOS 5.10 Generic_118833-03 sun4u sparc SUNW,Ultra-250

So, with that in mind, which, if any of these downloads would be appropriate for my comp? http://download3.eclipse.org/eclipse...1905/index.php

If someone could take a quick look and tell me if a download exists that is compatible with my computer, I'd be grateful.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

2. UNIX and Linux Applications

Groups are disappearing on opening of new konsole/terminal

Hi when I open a new KDE/terminal all my project groups are disappearing. help is much appreciated. Thanks Sujay (2 Replies)
Discussion started by: sujaybatni
2 Replies

3. Shell Programming and Scripting

Opening a file in vi and automatically save and quit this file using shell script

Hi friends, In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script. the code segment is: ------------------------------------------------------------ cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies

4. Shell Programming and Scripting

Xmllint - Xml-file problem --ods file not opening

Dear All, this is my first post on this Forum, glad to be here. I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted. When opening the document I get this EM: read error format error discovered in the file in sub-document content.xml at 2,337040(row,col). So I... (3 Replies)
Discussion started by: jameslast
3 Replies

5. Web Development

Help with opening/viewing doc file via linux terminal

I am currently trying to open a .doc file in my workstation via terminal. This is my code: root@ojt:/home/ojt/Desktop# cat arts_life.doc and it gave me a bunch of unknown characters together with the contents of the doc file. What I actually want to happen is that it will open the... (4 Replies)
Discussion started by: chams
4 Replies

6. UNIX for Dummies Questions & Answers

Help with opening/viewing doc file via linux terminal

I am currently trying to open a .doc file in my workstation via terminal. This is my code: root@ojt:/home/ojt/Desktop# cat arts_life.doc and it gave me a bunch of unknown characters together with the contents of the doc file. What I actually want to happen is that it will open the... (2 Replies)
Discussion started by: chams
2 Replies

7. UNIX for Dummies Questions & Answers

Opening a terminal with bash

Hi, The computer that I use is on a network and has the exact same installation as other computers on the network (Ubuntu 10.04 LTS). When I open a new terminal window by default it opens a tcsh shell. I don't have the root privilege to modify it. Is it possible to open a terminal window that... (8 Replies)
Discussion started by: gaurab
8 Replies

8. IP Networking

start a new terminal from a script after opening VPN

Hi all, I am trying to write a script that launch the cisco vpn client from the command line and then connects to a remote host using ssh. When i connect to the cisco vpn using vpnclient client connect the last lines of output from that client is Encryption: 168-bit 3-DES Authentication:... (0 Replies)
Discussion started by: borderblaster
0 Replies

9. Shell Programming and Scripting

how to know whether that file has eol or noeol before opening that file in VI editor

Hi, I want to check whether file has EOL or NOEOL before opening this file in VI editor. My file is very big its in terms of 15-20 MB. I am using ksh for this. When we opened the file in vi editor, normally at last line we are able to see whether this is eol or noeol file. But i does want... (1 Reply)
Discussion started by: HariRaju
1 Replies

10. UNIX for Dummies Questions & Answers

opening a file

im trying to open a file in my bin directory and the farthest i can get is into the folder but not the actual file itself i use text edit as the editor. when i try to open the file it says it doesn't exist here is what i type cd bin open cmnds (dir. which it is under) open test no such... (4 Replies)
Discussion started by: hiei
4 Replies
Login or Register to Ask a Question