[Novalug] question about linux file names
novalugml at jgcomp.com
Tue Dec 15 20:43:41 EST 2009
On Wed, Dec 16, 2009 at 11:46:57AM +1300, Mark Smith wrote:
> On Tue, Dec 15, 2009 at 12:36:55AM -0500, Jon LaBadie wrote:
> > Wierdest one I ever intentionally made was .<backspace><space><backspace>
> > The leading dot prevented listing by simple ls or echo *.
> > If 'ls -a' or 'echo .*' were used, the <backspace><space> erased the
> > dot from the screen, but left the cursor one position to the right.
> > The second <backspace> took care of that.
> > It was used to hide a file in plain sight from someone who was not
> > actively looking for it. It was certainly not robustly hidden.
> when confused by your output, things not lining up, or weird
> characters or such, behold the wonder and beauty of pipes:
> ls -a | cat -v
As noted, 'not robustly hidden'
In this case ls's -b options would expose the file also.
As to the verbose cat, I kind of like to think of the input
as 'sick'. And where do you take a sick cat -- to the -vet :)
ls -a | cat -vet # probably piped into less
The added 't' option disambiguates spaces and tabs and
the 'e' option shows any spaces at the end of the filenames.
They are tough to discern otherwise.
Jon H. LaBadie jon at jgcomp.com
12027 Creekbend Drive (703) 787-0884
Reston, VA 20194 (703) 787-0922 (fax)
More information about the Novalug