This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use the list of files stored in a text file and process it

On Thu, Sep 30, 2010 at 3:37 PM, SJ Wright  wrote:
> I know one of the trip-ups I often have if I spend any time away from a
> L/Unix environment has to do with the "mv" command: I often forget that it
> prefers absolute paths from root folders (or in the case of Cygwin, virtual
> ones taken as real) or dot-dot-slash relative path syntax to just
> "/god-directory/" or what-have-you. Many other commands, particularly ls and
> ln -s, are likewise "particular about their paths."

(general "you" meant below)
Unix commands are not "particular about their paths". They just trust
you to give the correct file names. If the file name does not begin
with a slash, it is relative to the current directory. That may or may
not be what you intended. Using absolute paths ensures that the
meaning of a filename is not influenced by the current directory; but
using relative paths is often shorter. If you have trouble remembering
what the current directory is, try setting the prompt to always print
the current directory, like this:

 PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\t \$ '

GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ L w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]