LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 04-30-2011, 01:26 AM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,374

Rep: Reputation: Disabled
don't put filename in quotes when using wildcards


When I use cp to back up files, I couldn't use a wildcard until now. I just figured out I was making a syntax error. I had entered:
Quote:
cp -urv '/mnt/sda3/folder/folder/*.*' '/mnt/sdb2'
It worked only once I thought to remove the quotation marks--evidently, quotation marks prevent Linux from recognizing a wildcard. The correct syntax is:
Quote:
cp -urv /mnt/sda3/folder/*.* '/mnt/sdb2'
Is this an unnecessary thread? I don't know: any advanced user undoubtedly knows the above and will think "duh," but I supposed it might help a novice user.

Last edited by newbiesforever; 04-30-2011 at 01:28 AM.
 
Old 04-30-2011, 07:51 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Learn the syntax for a command. 'man command' is the place to get the basics. Sure it will seem cryptic at first but continued use will be fruitful.

Quote:
Just figured out a Linux problem that has been stumping you for months?
Fits, so I'll let your post stand within.

Just a few links to aid you to gaining some understanding;



1 Linux Documentation Project
2 Rute Tutorial & Exposition
3 Linux Command Guide
4 Bash Beginners Guide
5 Bash Reference Manual
6 Advanced Bash-Scripting Guide
7 Linux Newbie Admin Guide
8 LinuxSelfHelp
9 Utimate Linux Newbie Guide
10 Linux Home Networking
11 Virtualiation- Top 10

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
confused about usage of quotes and wildcards in linux joham34 Programming 15 03-07-2011 04:18 AM
How to put a string (w/ dbl & sgl quotes) into a pipe without it being changed ? lumix Linux - Newbie 8 05-15-2008 10:03 AM
Bash - double quotes don't protect Exclamation marks geoff_f Programming 15 04-15-2007 09:10 PM
put date as part of filename box_l Programming 3 07-27-2004 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 03:56 AM.

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
Open Source Consulting | Domain Registration