Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
When i write "dir" to see what's in a folder the terminal says: Bash: /bin/dir cannot execute binary file. What can i do? i Find this pretty anoying and need ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Sweden
    Posts
    10

    cannot execute Binary


    When i write "dir" to see what's in a folder the terminal says: Bash: /bin/dir cannot execute binary file. What can i do? i Find this pretty anoying and need help. thx in forward.

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    dir doesn't exist in Linux, the command that's used in UNIX-like systems is ls.
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  3. #3
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817

    Re: cannot execute Binary

    Quote Originally Posted by n00b1337
    What can i do? i Find this pretty anoying and need help.
    Yeah, well Linux finds it annoying when users ask it to do Windows commands....

    In the Tutorials section of the forums is this one on basic bash commands:
    http://www.linuxforums.org/tutorials...rial-1154.html

    For more information, O'Reilly & Associates has an excellent small book called Linux Pocket Guide

    A useful command (sometimes) when you want to do something, but you don't know what command will work, use the command 'apropos' with a keyword of what you are looking for. To see commands related to listing the contents of a directory, I would try:
    Code:
    apropos list
    ...or...
    apropos directory
    Finally, if you know a command, but you are not sure what it does or how to use it, use the 'man' command to see the "manual" pages:
    Code:
    man commandname
    Press 'q' to quit from 'man'.

    For man pages online, along with a handy list of most commands, go on-line to http://linuxreviews.org/man/
    /IMHO
    //got nothin'
    ///this use to look better

  4. $spacer_open
    $spacer_close
  5. #4
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    You can set aliases in the shell if you feel more comfortable with DOS commands (I must admit that DOS's md command is the only one with a better name than the UNIX one ):
    Code:
    alias dir="ls -l"
    alias copy=cp
    alias rename=mv
    Put them in one of your bash profile files to make them "permanent".

    Steve

  6. #5
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Quote Originally Posted by serz
    dir doesn't exist in Linux, the command that's used in UNIX-like systems is ls.
    Unfortunately, you are mistaken. dir does exist in GNU/Linux, and is part of the fileutils package. I find it annoying whenever I try to convert somebody to linux they never warm up to ls, even though it is much more powerful.

  7. #6
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817

    Re: cannot execute Binary

    Quote Originally Posted by I
    Code:
    apropos list
    ...or...
    apropos directory
    ...but when you do that, you'll get 200 lines of output from the first command and 61 lines from the second. So even better would be:
    Code:
    apropos list | grep directory
    ...which will result in only 4 commands, including both 'dir' and 'ls'. Let's see what dos can do to match that!

    Resource: Linux Pocket Guide
    /IMHO
    //got nothin'
    ///this use to look better

  8. #7
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Yes, you're right lakerdonald, my mistake
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  9. #8
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    I wish I was wrong though. haha

  10. #9
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Quote Originally Posted by lakerdonald
    I wish I was wrong though. haha
    Yes! hehe.

    :P
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  11. #10
    Just Joined!
    Join Date
    Apr 2005
    Location
    Sweden
    Posts
    10
    thx guys

Page 1 of 2 1 2 LastLast

Posting Permissions

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