Skip to Content
Using csh & tcsh
book

Using csh & tcsh

by Paul DuBois
July 1995
Beginner to intermediate
244 pages
5h 58m
English
O'Reilly Media, Inc.
Content preview from Using csh & tcsh

Referring to Files with Problematic Names

Occasionally, you may find yourself in possession of a file with a name containing special characters such as SPACE or ? or !, or perhaps even CTRL-H. You're not likely to create such names inadvertently from the command line, but it's relatively easy to do so in other circumstances. For example, you might discover, after saving an item in a gopher session, that you own a file with a lovely name like this:

<<** New Items! (READ THIS!!) **>>

Such a name can occur because, when you save an item to a file, some gopher clients suggest a default name that is the same as the item's title in the current menu.

Or, you might use FTP to grab files from a machine that is running an operating system with different filename conventions than UNIX. If the files you are retrieving have names containing characters the shell considers special, and your FTP program doesn't map them onto ordinary characters, you end up with files that are hard to refer to.

Usually, the best method for working with a difficult filename is to change the name immediately to something easier to use. Or, you might consider deleting the file, because often files that have ornery names were created accidentally and are unwanted.

Suppose that we have some files with names that contain various special characters, as shown below:

abc;1
Home Work
!abc
!abc and def
My Summer Vacation (Part 2)
REDCTRL-HADME
<<** New Items! (READ THIS!!) **>>

To work with difficult filenames like those shown above, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Shells by Example

Linux Shells by Example

Ellie Quigley

Publisher Resources

ISBN: 9781449377526Errata Page