How to open a particular file from a terminal?

You can use xdg-open to open files in a terminal.

From the man-page of xdg-open:

xdg-open - opens a file or URL in the user's preferred application

Usage

The command xdg-open _b2rR6eU9jJ.txt will open the text file in a text editor that is set to handle text files. The command will also work with other common file extensions, opening the file with the relevant application.

See also:

  • How can I open a file in my terminal, like nautilus does it?

You must use an editor to open a text file:

Any of those can do it:

 - vi _b2rR6eU9jJ.txt
 - vim _b2rR6eU9jJ.txt
 - emacs _b2rR6eU9jJ.txt
 - nano _b2rR6eU9jJ.txt
 - gedit _b2rR6eU9jJ.txt (gnome's default editor)
 - leafpad _b2rR6eU9jJ.txt (lxde's default editor)
 - kedit _b2rR6eU9jJ.txt (KDE's default editor)

Or if you wanted to just view the file without modifying its contents: cat _b2rR6eU9jJ.txt

EDIT #1: I just noticed that the question is tagged fedora, which up until now is using gnome as its core graphical user interface, which comes with gedit preinstalled. So this is guaranteed to work: gedit _b2rR6eU9jJ.txt


You should use an appropriate application to open it - try nano _b2rR6eU9jJ.txt or cat _b2rR6eU9jJ.txt. The former will edit, the latter will output it to standard output. (Note - you can replace nano with vi, emacs or other text editor of your preference)

From what I can tell

geek@ubuntu:~$ open --help
open: invalid option -- '-'
Usage: openvt [-c vtnumber] [-f] [-l] [-u] [-s] [-v] [-w] -- command_line

open refers to openvt - and the man page describes it as openvt - start a program on a new virtual terminal (VT). You're trying to open a text file, so unless I'm missing something, it isn't the software for doing what you want to do.