LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-06-2018, 09:04 PM   #1
Saki19
LQ Newbie
 
Registered: Mar 2018
Posts: 1

Rep: Reputation: Disabled
Question related to cp -r


You do not know your present working directory. Duplicate directory called quiz (located in /tmp) into your present working directory.
There is no need to mention "quiz" as the destination path - it would be redundant.

HINT: Your command will require an option and two pathnames.

How does this work, I have tried everything and nothing is working for me. Someone help
 
Old 03-06-2018, 09:45 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,637

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Code:
PWD
home/blah
cp -r /tmp/quiz .
period marks present dir, the one you're in when issuing a command such as cp or mv even find
Code:
$ find . -name Documents
./Documents
  1. cp = copy
  2. -r = recursive
  3. /tmp/quiz source
  4. . = present directory

Last edited by BW-userx; 03-06-2018 at 09:48 PM.
 
Old 03-06-2018, 11:09 PM   #3
Mill J
Member
 
Registered: Feb 2017
Location: 127.0.0.1 Sweet 127.0.0.1
Distribution: Void, MX, Haiku, Icaros, Puppy and many others
Posts: 981
Blog Entries: 2

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Is this homework or something?
 
Old 03-07-2018, 03:19 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,422
Blog Entries: 9

Rep: Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668Reputation: 3668
Homework.

op: read
Code:
man cp
it really isn't that hard.
 
1 members found this post helpful.
Old 06-19-2018, 11:38 PM   #5
X-man420
LQ Newbie
 
Registered: Jun 2018
Posts: 1

Rep: Reputation: Disabled
Your present working directory has the following contents:

DIagram A

The following command is entered: cd aa/bb

Provide a command, which using relative pathnames, would transform the aa directory to the following:

Diagram B

HINT: You will need to use a command capable of creating new blank files.
 
Old 06-20-2018, 02:18 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,614

Rep: Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367Reputation: 4367
is this some kind of help to the original question?
If not, please open a new thread and try to explain what do you need (a bit better).
 
Old 06-20-2018, 08:48 AM   #7
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
I thought we had a LQ rule stating "do not copy and post homework question verbatim". Still there are enough members willing to do this person's homework.

Quote:
I have tried everything and nothing is working for me. Someone help
Sure, nothing is working.

The hint provides all darned information, but "nothing works"

jlinkels
 
1 members found this post helpful.
Old 06-20-2018, 09:04 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,448
Blog Entries: 13

Rep: Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762
I've closed this thread.

@Saki19 and @X-man420,

Please do not post homework assignments verbatim. This is in the LQ Rules and explained pretty well in them:
Quote:
  • 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 searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
A reminder to other members to please report these types of threads.
 
1 members found this post helpful.
  


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
Question related to SSH rajeshkerala Linux - Newbie 12 08-17-2009 11:47 PM
KDE-related question. kamransoomro84 Linux - Desktop 2 09-01-2006 01:00 PM
Backup related question Ibrahimbazar Linux - General 1 06-17-2006 09:04 AM
c related question. blackzone Programming 1 07-24-2004 09:55 AM
DNS related question tusher Linux - Newbie 1 12-07-2003 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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