LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 08: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, 08:45 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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 08:48 PM.
 
Old 03-06-2018, 10:09 PM   #3
Mill J
Senior Member
 
Registered: Feb 2017
Location: @127.0.0.1
Distribution: Mint, Void, MX, Haiku, PMOS, Plasma Mobile, and many others
Posts: 1,258
Blog Entries: 2

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Is this homework or something?
 
Old 03-07-2018, 02:19 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Homework.

op: read
Code:
man cp
it really isn't that hard.
 
1 members found this post helpful.
Old 06-19-2018, 10: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, 01:18 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
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, 07:48 AM   #7
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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, 08:04 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

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



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

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

All times are GMT -5. The time now is 11:36 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
Open Source Consulting | Domain Registration