LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2014, 07:48 AM   #1
Scottb613
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Rep: Reputation: Disabled
Cygwin Question


Hi Folks,

First post - if I'm reading the forum notes correctly I have to post here to be able to post elsewhere ?

Regards,
Scott
 
Old 04-29-2014, 08:06 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,833
Blog Entries: 14

Rep: Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081
The idea is to post a bit of an introduction of yourself and also to verify you're not just joining to post spam.
 
1 members found this post helpful.
Old 04-29-2014, 08:36 AM   #3
Scottb613
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi Folks,

Ok - I'm a 20+ year IT veteran currently contracted by a large national telco... I've done a bit of everything over the years - starting out with PC based Unix with Token Ring networks - back when we had to load the OS with around 40 individual floppy disks... Over the years I've been a Solaris, AIX, and HPuX admin... I've been an Informix DBA and developer... I've dabbled in some light programming efforts... For the last 10 years or so I've been focused on the network side managing large mission critical networks for State Lottery and the NYSE...

I just have a very simple shell script question to which the answer seems to allude me - LOL - probably just getting old... I have a bunch of files that all start with the "-" character ( -moo, -moo1, -moo2 )... I just need to rename them as Unix treats the "-" as a switch... What's the syntax to move these files while canceling out the special meaning of the "-" ?

Thanks...

Regards,
Scott
 
Old 04-29-2014, 09:09 AM   #4
Scottb613
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Oh - forgot this - on a Solaris box - this works:

mv -f - '-moo' /tmp/SCO-moo

However - it doesn't work on a Cygwin box...

Regards,
Scott
 
Old 04-29-2014, 12:14 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,833
Blog Entries: 14

Rep: Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081
mv .//-moo /tmp/SCO-moo

I figured that out because when I tried to create my test file on Cygwin it complained:
$ touch ./"\-moo"
cygwin warning:
MS-DOS style path detected: ./\-moo
Preferred POSIX equivalent is: .//-moo
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/usin...sing-pathnames
touch: cannot touch `./\\-moo': No such file or directory
 
1 members found this post helpful.
Old 04-29-2014, 01:49 PM   #6
Scottb613
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the help Mensa !!!

Yeah - while beating my head against the wall I came up with another way around it - I just included the absolute PATH which moved the placement of the "-" to a place where it could cause no harm... Thanks for the references - I'll take a look at them as well - LOL - you never know when you need to pull something out of your bag of tricks... Much appreciated...

Regards,
Scott
 
1 members found this post helpful.
Old 04-29-2014, 02:23 PM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,833
Blog Entries: 14

Rep: Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081Reputation: 1081
Glad you fixed it. At top of thread should be a link to "Mark this thread as resolved". If you do that others with same issue in future may find the fix more quickly.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running wget from .bat using cygwin - syntax question alpinescott Linux - General 3 02-02-2010 01:58 PM
Cygwin shell programming question Rostfrei Linux - General 6 06-30-2006 03:36 PM
connecting to X using Cygwin : Concept Question, not technical Chadian22 Linux - Software 0 08-28-2004 03:43 PM
Where do Cygwin question go? marz2 General 2 03-07-2004 04:55 PM
If X server (Cygwin) is the answer, I need a new Question -G- Linux - Networking 17 03-13-2003 11:09 PM


All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration