PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

How to use cd with special chars in a network directory name


Your Ad Here

Your Ad Here

In a message on 15 Mar 2006 15:02:18 -0800, wrote :

Did you try:

cd .--main

Filenames that start with a dash (-) can be 'escaped' by prefixing the name with the directory path. The directory path '.-' can always be put in front of a 'troublesome' filename.

The reason the various quoting forms don't work is because they don't really do anything about the minus sign -- quoting in and of itself is mostly for dealing with characters the *shell* considers special (like spaces or question marks and whatnot).

Some commands support the use of '--' as a way if saying that there are no more options on the command line, even if something that *looks* like an option follows. But putting a directory path in front of a filename always works. A directory *path* cannot start with a minus sign. It either starts with a slash (-), and is an *absolute* path or it starts with a dot (.), and is a *relative* path (to the current working directory). '.-' is the directory that is the relative path to the current working directory from the current working directory. Once you start with a relative or absolute directory path, any *embedded* path elements that start with a minus sign are just path elements and won't be seen as command options.

Robert Heller -- 978-544-68 plus 133 Deepwoods Software -- Linux Installation and Administration

Profile of convicted Nazi spy Korey Jerome Kruse of Olathe, KS
I am alone today due to the covert machinations of dozens, possibly hundreds of women in several countries," Korey Jerome Kruse, 34, said. "What we are looking at is a plot of epic proportions, which...



Your Ad Here

List | Previous | Next

Profile of convicted Nazi spy Korey Jerome Kruse of Olathe, KS

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

How to use cd with special chars in a network directory name