Need Help With File Globbing
I have been trying to finish this lab allday and cannot figure out the correct command. The problem is:
Copy every file from the hplip/data/images directory whose name starts with deskjet and whose model number ends in a C, into your newly created hplip_stuff/color_deskjets directory. Note, there are a different mix of lowercase and uppercase letters. Be sure to include them all. |
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
|
File Globbing
I am a beginner and the only thing we were given in class was a few handouts which do not really help me at all. I tried all kinds of stuff. I tried cp hplip/data/images/deskjet* _*C hplip_stuff/color_deskjets/.
I know that is extremely wrong. I have no clue how to do it correctly.. Any hel will be appreciated. |
did you try
cp hplip/data/images/deskjet????????C hplip_stuff/color_deskjets/. and cp hplip/data/images/deskjet*C hplip_stuff/color_deskjets/. |
file globbing
I have tried that and it keeps saying no such file or directory
|
Quote:
cp `find <insert find command options and names here>` ./ Note those are backticks, not single-quotes; that's another good thing for you to look up. Also, we're always glad to help someone out, but posting blatant homework assignments is a good way to get NOTHING, especially posting it multiple times, without saying what you've done. And if the handouts/textbooks you were given don't cover the material, take that up with your instructor. |
Recommend you bookmark/read
http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://linux.die.net/man/ |
nah, `backticks` are the suxx0rz (that means obsolete I believe), use $(this format) instead.
|
Quote:
|
I'm old school as well; this newfangled $() notation is hard to get used to ;)
|
YAY! I think I did it! LOL, I know it wasn't my problem and it's no shot at the OP, just a linux newbie having fun with someone else's assignment...........
Thanks to all |
All times are GMT -5. The time now is 09:02 PM. |