%ls
afile exefiles j toobig %lpr afile
lpr: afile: No such file or directory
Huh?? ls shows that the file is there, doesn't it? Try using:
-v -t -e | % |
---|
The cat -e option marks the ends of lines with a $
.
Notice that afile
has a $
out past the start of the column.
Aha... the filename ends with a space.
Whitespace characters like TABs have the same problem, though the
default
ls -q (16.14)
option (on many UNIX versions) shows them as ?
if you're using a terminal.
To rename afile , giving it a name without the space, type:
%mv "afile " afile
The quotes (8.14) tell the shell to include the space as part of the first argument it passes to mv. The same quoting works for other UNIX commands like rm, too.
-