Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General > Member Success Stories
User Name
Password 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.


  Search this Thread
Old 04-30-2011, 01:26 AM   #1
Senior Member
Registered: Apr 2006
Posts: 2,013

Rep: Reputation: 76
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:
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:
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
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,735
Blog Entries: 27

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063

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.

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!



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
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

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

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