今天在64服务器上:发现好像bash 坏了,用户名前边 用-bash 显示,,前几天就发现这个问题,,,但是当时忙没有解决,,,,,今天来看看到底是怎么回事!
File Exists but... "-bash: No such file or directory"
网上找到一篇文章,是说ubuntu系统的,我现在使用的是RHEL6.1 ,先不说其他的,先实践再说,完了看效果!!
-----------------粘贴网上原文---------原文地址:http://superuser.com/questions/344533/no-such-file-or-directory-error-in-bash-but-the-file-exists
![](http://engine.adzerk.net/i.gif?e=eyJhdiI6NDE0LCJhdCI6NCwiYnQiOjAsImNtIjozNzM4NjIsImNoIjoxNjUzMSwiY2siOnt9LCJjciI6MTQ1MTYzMiwiZGkiOiI4MjNlZWZmM2UyM2M0MGFhYWFlNmEzNWZlNzQ5ZTA5MyIsImRtIjoxLCJmYyI6MTY3NDM2MiwiZmwiOjE1MzMwNzIsImlwIjoiMS4xODAuMjM1LjM5Iiwia3ciOiJ1YnVudHUsYmFzaCxhbmRyb2lkIiwibnciOjIyLCJwYyI6MCwiZWMiOjAsInByIjo1NzIyMiwicnQiOjIsInJmIjoiaHR0cHM6Ly93d3cuYmFpZHUuY29tL2xpbms_dXJsPVNKb25KZU1ELUxZeGNBU1pFaDdmSldER3lZNWZra25DMl9fMlZwTjJKV3lvWDhadXVoMmNZdTlTOTZCbVFDREFmQ3phZi1wLUJFQWo0cnM1SUpmSU02TEZTdkRuQy1mQ1V3SlljaW9TdzhwRnBCMUFvZmN4OExOOHdENGJSclN1RUptbGFjUHN5T3J6TDZSZVBIcWdPcSZ3ZD0mZXFpZD1iYTQ5YWI5MTAwMDBlNjhhMDAwMDAwMDM1ODJhZGQ0NSIsInN0Ijo4NDc2LCJ1ayI6InVlMS0yZjhiMDA0MGM3Yjk0MWVkYmRiNTE1OTc3OTY3Yzc4NSIsInpuIjoyOSwidHMiOjE0NzkyMDQ0MzQyNDMsImJmIjp0cnVlLCJwbiI6ImFkemVyazE2NTk3MjEzODAiLCJmcSI6MH0&s=ouzVXy_nF-FxT3QXoQ5RE1HeEiI)
|
On Ubuntu, I get a 'No such file or directory' error when I try to execute a command.
I have checked with ls -la , the file adb is there and it has 'x' flag So why I am getting a 'No such file or directory'?
~/Programs/android-sdk-linux_x86/platform-tools$ ./adb
bash: ./adb: No such file or directory
~/Programs/android-sdk-linux_x86/platform-tools$ ls -la
total 34120
drwxrwxr-x 3 silverstri silverstri 4096 2011-10-08 18:50 .
drwxrwxr-x 8 silverstri silverstri 4096 2011-10-08 18:51 ..
-rwxrwxr-x 1 silverstri silverstri 3764858 2011-10-08 18:50 aapt
-rwxrwxr-x 1 silverstri silverstri 366661 2011-10-08 18:50 adb
-rwxrwxr-x 1 silverstri silverstri 906346 2011-10-08 18:50 aidl
-rwxrwxr-x 1 silverstri silverstri 328445 2011-10-08 18:50 dexdump
-rwxrwxr-x 1 silverstri silverstri 2603 2011-10-08 18:50 dx
drwxrwxr-x 2 silverstri silverstri 4096 2011-10-08 18:50 lib
-rwxrwxr-x 1 silverstri silverstri 14269620 2011-10-08 18:50 llvm-rs-cc
-rwxrwxr-x 1 silverstri silverstri 14929076 2011-10-08 18:50 llvm-rs-cc-2
-rw-rw-r-- 1
|