Re: ls or cp: cannot stat error
- From: Cameron Simpson <cs@xxxxxxxxxx>
- Date: Thu, 26 Apr 2007 18:06:03 +1000
On 23Apr2007 12:23, Carl Reynolds <redhat-list@xxxxxxxxxxxxxxxxxxxxxx> wrote:
| Eng KC wrote:
| >When I do a ls * like below
| >
| >[oracle@db]$ ls -l /data4/v5lmts/vin_group*
| >
| >I can see the file, but if I do a ls /path/filename like below
| >
| >[oracle@db]$ ls /data4/v5lmts/vin_group3_add1.ora
| >ls: /data4/v5lmts/vin_group3_add1.ora: No such file or directory
| >
|
| It looks as if you have an invisible character (like ' ') in the file
| name. try something like
|
| $ ls /data4/v5lmts/vin_group3_add1.* | sed -e 's/^/</' -e 's/$/>/'
|
| to see if the file has an extra space at the end.
This is shorter and more clear:
ls -d /data4/v5lmts/vin_group3_add1.* | sed 's/.*/<&>/'
but I prefer this, myself:
ls -d /data4/v5lmts/vin_group3_add1.* | sed -n l
Another incantation that's sometimes useful is:
ls -d /data4/v5lmts/vin_group3_add1.* | od -c
Cheers,
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/
Beware of bugs in the above code; I have only proved it correct, not tried it.
- Donald E. Knuth
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- References:
- Re: ls or cp: cannot stat error
- From: Carl Reynolds
- Re: ls or cp: cannot stat error
- Prev by Date: Re: regarding Redhat Boot
- Next by Date: mail server
- Previous by thread: Re: ls or cp: cannot stat error
- Next by thread: Re: ls or cp: cannot stat error
- Index(es):
Relevant Pages
|
|