How do i command my linux machine to run or open a file..?
so i have a mac and i get around the terminal and i know most of the commands. ie open application.*
however im trying to figur out linux and im stuck
are there diffrent kinds of linux and therefore different commands.
how do i tell my pclinux to open a .torrent file. same as if i web and double clicked on it.
i know to edit its vi and to read its cat
my question is if im connected to the computer via ssh. and i want it to start download the file via bittorrent,
The open command opens a file (or a directory or URL), just as if you had
double-clicked the file’s icon. If no application name is specified, the
default application as determined via LaunchServices is used to open the
specified files.
[root@localhost Desktop]# eog jj.torrent
-bash: eog: command not found
[root@localhost Desktop]# open jj.torrent
-bash: open: command not found
Tagged with: application name • default application • diffrent kinds • Linux • open application • pclinux • ssh • torrent file
Filed under: Linux Applications
Like this post? Subscribe to my RSS feed and get loads more!
you need to run the torrent program you have eg
/usr/bin/rtorrent ~/mytorrent.torrent
to edit
vi "filename"
to view
cat "filename"
Nearly all (95%) of the linux distros use the same commands on the command line. They use what is called the bash shell. Below is a short explanation of some ofthe bash commands.
The command open is not the standard command to open a file. Take a look at man open.
There are different commands to open different types of files:
to open/run a program; firefox will run the firefox browser.
to open a text file; less filename.txt will open a file named filename.txt
eog will open an image in an imageviewer.
I believe that "If no application name is specified, the
default application as determined via LaunchServices is used to open the specified files." does not work on the command line. If for example you simply type on the command line mybook.pdf it will say command not found and will not use a default app.
I do not remember what type of file .torrent is but you need to specify what you want to use to open .torrent.
First, never use the root user for everyday tasks. That’s *asking* for trouble. To read a file in the linux command line, just type "cat filename"(without the quotes). If the file is a long one, it will scroll all the way through the window and you won’t be able to read the top part of the file. If that happens, just use "less filename", this will open the file so that you can scroll up or down with the arrow keys or Pgup/Pgdn. just hit "q" to exit the less program and get back to the shell. To edit a file use an editor like vim or emacs. Typing "vim filename" will open the file for editing. Personally, I like nano and its precursor pico, but they may may not be included in your linux distro by default. They do not have as steep a learning curve as vim and emacs, just be informed: preceding a letter with a caret like "^X" means to press the Ctrl key at the same time as the letter. If you want to open a file with another program, try preceding the filename with the program name like"ktorrent filename.torrent". This assumes you have the program on your computer and can run it.