Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Cannot open anything with a specific name

  1. #1
    Join Date
    Dec 2016
    Beans
    3

    Cannot open anything with a specific name

    So, I don't know what I'm doing wrong. But anytime I trying to execute or open a named file (such as studio.sh), I get "not found". I also seem to be unable to open the google chrome folder. The command appears to be correct, and I checked, and rechecked several times that the name of the executable or folder are perfectly copied.

    For example. I go to android-studio/bin and try "exec studio.sh" it gives me "not found".
    Same thing when I try to open or navigate to "google-chrome-stable_current_amd64.deb". The name is correct but it keeps saying that it cannot find the file.

    I'm more than likely doing something wrong but I don't really know at the moment.

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Cannot open anything with a specific name

    'exec' is almost certainly not what you want in this context

    To execute a file (shell script or executable binary) that is not in a directory that's on your current PATH, you need to give a relative or absolute path to the file e.g.

    Code:
    ./studio.sh
    .deb files aren't normally executable AFAIK

  3. #3
    Join Date
    Jan 2014
    Location
    Japan
    Beans
    13
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Cannot open anything with a specific name

    ,deb files should be ran by double click so that it opens with the package manager or with terminal by typing

    Code:
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    sudo apt install -f
    If I remember correctly that is the way to run a .deb file from terminal.
    The first line grabs the dependencies needed and the second one installs the dependencies and the application.

  4. #4
    Join Date
    Dec 2016
    Beans
    3

    Re: Cannot open anything with a specific name

    Thank you both for the help. Very new to linux and theres quite a learning curve.

  5. #5
    Join Date
    Jan 2014
    Location
    Japan
    Beans
    13
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Cannot open anything with a specific name

    No problem.

    A book you might want to check out if you are interested (this is the one that I am using now for my UNIX/Linux class) is:

    The Linux Command Line
    Second Internet Edition
    William E. Shotts, Jr.

    It is really easy to follow and teaches you a lot of things that you could benefit from if you decide to use Linux long term.
    I just wanted to put something here...

  6. #6
    Join Date
    Mar 2015
    Location
    Great Plains
    Beans
    1,236
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Cannot open anything with a specific name

    Just interested in "why" you are trying these methods to open a directory, file, or to execute a program.

    You normally just start a program from using a pre-assigned icon which is clicked on in the left-launcher panel (if using Unity DE), or by right-clicking a file in your /home directory tree and choosing the "open with" dialog. Another normal way is to double click an executable file that is in your /home directory. Shell scripts are usually started from within /home also.

    Standard users normally do not need to click on or access files outside of home unless they get sudo rights for a particular reason (like editing a configuration file, etc.)
    Last edited by Geoffrey_Arndt; December 15th, 2016 at 03:15 AM. Reason: typo
    Problem installing Ubuntu? . . Just get it "Preinstalled" (like you did for Windows!) . . http://linuxpreloaded.com/

  7. #7
    Join Date
    Dec 2016
    Beans
    3

    Re: Cannot open anything with a specific name

    Well, learning to use the command line would be a valuable skill in linux. As far as I understand. The GUI has a limited capability. Terminal seems to have many more options

  8. #8
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Cannot open anything with a specific name

    Hello!

    The terminal gives one great power and granularity, exactly as it does in Windows. If you aren't aware, you can use cmd in Windows.

    Also like Windows is the fact that one can manage to use only GUI features and not bother with the terminal.

    The reason support forums like this use the terminal so much is that it is common -- and avoids the need to know all the details of the dizzying array of desktop environments out there.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  9. #9
    Join Date
    Dec 2016
    Beans
    2

    Re: Cannot open anything with a specific name

    Quote Originally Posted by sephingx View Post
    So, I don't know what I'm doing wrong. But anytime I trying to execute or open a named file (such as studio.sh), I get "not found". I also seem to be unable to open the google chrome folder. The command appears to be correct, and I checked, and rechecked several times that the name of the executable or folder are perfectly copied.

    For example. I go to android-studio/bin and try "exec studio.sh" it gives me "not found".
    you can run it by typing "sh studio.sh" or "chmod +x studio.sh; ./studio.sh"

    Same thing when I try to open or navigate to "google-chrome-stable_current_amd64.deb". The name is correct but it keeps saying that it cannot find the file.

    I'm more than likely doing something wrong but I don't really know at the moment.
    .deb packages need to be installed by dpkg command: "dpkg -i google-chrome-stable_current_amd64.deb"

  10. #10
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Cannot open anything with a specific name

    Quote Originally Posted by sephingx View Post
    So, I don't know what I'm doing wrong. But anytime I trying to execute or open a named file (such as studio.sh), I get "not found". I also seem to be unable to open the google chrome folder. The command appears to be correct, and I checked, and rechecked several times that the name of the executable or folder are perfectly copied.

    For example. I go to android-studio/bin and try "exec studio.sh" it gives me "not found".
    Same thing when I try to open or navigate to "google-chrome-stable_current_amd64.deb". The name is correct but it keeps saying that it cannot find the file.

    I'm more than likely doing something wrong but I don't really know at the moment.
    Welcome to the forums, sephingx

    I'm making some assumptions here, but based on your actions, I suspect that you were trying to run "executables" as if Linux were Windows. Moreover, your understanding of what a .deb file is may be misconceived.

    I think that your last sentence is very appropriate. Before learning to run, let's learn how to walk. I recommend that you have a look at the links in my sig, especially: Linux is Not Windows, Resources for Newcomers, and A Great CLI Guide. There are also these:

    http://www.psychocats.net/ubuntu/index
    http://ubuntuguide.org/wiki/Ubuntu:Trusty
    http://ubuntu-manual.org/
    https://linuxjourney.com

    I strongly recommend that you get familiar with the Linux file structure, user model and other Linux fundamentals before diving into CLI commands. Even then, I suggest starting out with simple commands like cp and ls before proceeding to things like what you are trying to do. Please don't get me wrong. I think it's great that you are enthusiastic about the command line and want to learn it, but things will go easier if you start at the beginning and not try to jump in the deep end.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •