LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 06-24-2010, 12:11 PM   #1
Dru-Jitsu
Member
 
Registered: Jun 2010
Posts: 38

Rep: Reputation: 15
Help with cp using absolute paths and globbing.


Here's a new questions I am stuck on... I think I have the right idea just something needs a little tweaking.

You should currently be inside your lab09 directory. Create a subdirectory called ones and copy (from inside your lab 09 directory) all the files in the /labs/data/filenames/ that end with a 1,2,3-9 into this new ones directory. I.e. copy the files file.1 - file.9 etc. but not the files file.11, file.21 etc. Write the full command to cope these files into this new ones directory using only relative paths.

Both directories are created and there /lab09/ones

I am starting in lab09 Then I move to /labs/data/filenames/ and ls -l to see what I am looking for after I see my files there I am moving back into lab09.

This is what I am trying to use cp ../../../../../labs/data/filenames file.[1-9]

Any suggestions? It is homework and I know the rules I am not expecting full answers but I do need some insight.

Thanks
 
Old 06-24-2010, 12:23 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

I have replied in your previous thread
 
  


Closed Thread


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
Help with cp using absolute paths and globbing. Dru-Jitsu Linux - Newbie 4 06-24-2010 02:03 PM
Shell Script how to remove absolute paths from zip archive hi_irf Linux - Newbie 1 10-03-2009 06:59 AM
[SOLVED] untar backup into new directory? absolute paths in tar qwertyjjj Linux - Newbie 4 08-19-2009 04:41 PM
Absolute and relative paths Gins Linux - General 6 11-08-2008 09:48 PM
relative/absolute paths in Java djgerbavore Programming 2 10-26-2004 09:01 PM


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