LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 02:26 AM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Glendale, AZ
Distribution: Distro-homeless. Lost.
Posts: 1,886

Rep: Reputation: 62
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 02:28 AM.
 
Old 04-30-2011, 08:51 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,451
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
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


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 05: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 11:03 AM
Bash - double quotes don't protect Exclamation marks geoff_f Programming 15 04-15-2007 10:10 PM
put date as part of filename box_l Programming 3 07-27-2004 07:17 AM


All times are GMT -5. The time now is 08:02 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration