New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

zip problem


Post Reply New Thread Subscribe

 
Thread Tools
John Greer

 
Member Since: Jun 20, 2011
Posts: 56
John Greer is on a distinguished road

John Greer is offline
I'm new to Apple (converted in June, from decades of PC).
I want to archive my MS Office backup files.
I had no trouble doing it on my PC, but I'm having trouble converting the command to run on my Mac.
I have it running (made it executable), but it's not finding my files.

When I run:
Code:
#!/bin/bash
zip -m -r -o -9 -dc -dd  /Volumes/Backup2048/Word /Volumes/*.wbk "/Volumes/Backup of*.docx"
I get these messages:
zip warning: name not matched: /Volumes/*.wbk
zip warning: name not matched: /Volumes/Backup of*.docx
btw - Backup2048 is my USB backup drive and HDD2048 is my internal drive.

HELP!

-John

27" iMac w 4x3.4 GHz, iPhone 5 wannabe, 64GB iPod Touch & MobileMe
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Ok, first.. what's the expected output? Are you trying to create a single zip of the contents of all .wbk files in

Volumes/Backup2048/Word\ /Volumes/

Or are you trying to zip each wbk file?

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
John Greer

 
Member Since: Jun 20, 2011
Posts: 56
John Greer is on a distinguished road

John Greer is offline
I'm trying to create a single Zip file called WORD in the /Volumes/Backup2048/ folder. This zip file will contain all the *.wbk and Backup*.docx files on any drive on my iMac.

I think my problem is more fundamental.



If I say
ls -G -h -k -R /Volume/*.wbk
it returns
ls: /Volume/*.wbk: No such file or directory
yet if I drill down to the directory that contains the files, the LS command works. It's almost as if the -R switch is not working for this command. -R works for other files. Strange...

-John

27" iMac w 4x3.4 GHz, iPhone 5 wannabe, 64GB iPod Touch & MobileMe
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Oh! Try this

find / -name *.wbk

That should show every file on your system (from the root dir / down). I really prefer find to ls for this type of work in general

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
chas_m

 
chas_m's Avatar
 
Member Since: Jan 22, 2010
Location: Victoria, BC
Posts: 16,412
chas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond repute
Mac Specs: 2009 MBP, Black speakers, Black Benq second monitor, black(ish) iPhone 5s, Black 2012 iPad, etc.

chas_m is offline
Wouldn't making a smart folder of all *.wbk files and then archiving them (right click) be both faster and more elegant? Or did I miss something?
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Possibly. It depends on what your definition of 'more elegant' is I suppose. Personally I'd have done something like...

find / -name *.wbk -exec zip -g /path/to/whatever.zip {} ';'

Since I'm RARELY in Finder, but ALWAYS have a terminal window open, for me.. this IS more elegant. Especially if you cron it

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
chas_m

 
chas_m's Avatar
 
Member Since: Jan 22, 2010
Location: Victoria, BC
Posts: 16,412
chas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond repute
Mac Specs: 2009 MBP, Black speakers, Black Benq second monitor, black(ish) iPhone 5s, Black 2012 iPad, etc.

chas_m is offline
Oh you UNIX/CLI geeks!
QUOTE Thanks
dtravis7

 
dtravis7's Avatar
 
Member Since: Jan 04, 2005
Location: Modesto, Ca.
Posts: 27,534
dtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond repute
Mac Specs: iMac 2.4 C2D 10.9.4, iMac 2.16 C2d 10.6.8, Macbook2007 10.8.4, Mac Mini 10.8.4, iPhone 3GS Note 8!!

dtravis7 is offline
Quote:
Originally Posted by chas_m View Post
Oh you UNIX/CLI geeks!
I was like that except a DOS command line freak! Loved even in Windows to use the DOS command prompt. I know a little Unix and terminal, but for what the OP is doing, I probably would just get the files together and right click!
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Quote:
Originally Posted by chas_m View Post
Oh you UNIX/CLI geeks!
So, how exactly does one with a fine arts education get into development? I have nooooo idea.

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
John Greer

 
Member Since: Jun 20, 2011
Posts: 56
John Greer is on a distinguished road

John Greer is offline
Quote:
Originally Posted by Dysfunction View Post
Oh! Try this

find / -name *.wbk

That should show every file on your system (from the root dir / down). I really prefer find to ls for this type of work in general
That command found the files!
That's the good news.
Now if I could only figure out why zip is not working...

-John

27" iMac w 4x3.4 GHz, iPhone 5 wannabe, 64GB iPod Touch & MobileMe
QUOTE Thanks
John Greer

 
Member Since: Jun 20, 2011
Posts: 56
John Greer is on a distinguished road

John Greer is offline
Quote:
Originally Posted by chas_m View Post
Wouldn't making a smart folder of all *.wbk files and then archiving them (right click) be both faster and more elegant? Or did I miss something?
Being new to Mac, the obvious question is, "What's a Smart Folder?"

Time for me to read some...

[edit]
Thanks for the pointer to Smart Folders. This looks like a good way to repeatedly find stuff, but I'd still like zip to be able to find and remove certain files for me.
[/edit]

-John

27" iMac w 4x3.4 GHz, iPhone 5 wannabe, 64GB iPod Touch & MobileMe
QUOTE Thanks

Post Reply New Thread Subscribe


« New Mac user wants to Upgrade Ram | Time Machine:include from excluded? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
could this be an OS problem? Anyuta OS X - Operating System 0 11-22-2010 04:50 PM
Strange iweb problem Anyuta Web Design and Hosting 0 09-27-2010 12:46 PM
2009 MBP - Possible Trackpad Problem tricky10 Apple Notebooks 6 09-09-2010 07:01 AM
iPhone onscreen volume control problem smuggerific iOS and Apps 1 04-19-2010 10:18 AM
Memorex zip drive problem OK Computer Other Hardware and Peripherals 0 07-01-2008 10:18 PM

All times are GMT -4. The time now is 12:50 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?