LinuxQuestions.org
Review your favorite Linux distribution.
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


Reply
  Search this Thread
Old 09-16-2016, 09:38 AM   #1
jefinc
LQ Newbie
 
Registered: Sep 2016
Posts: 1

Rep: Reputation: Disabled
how to create a tree?


i need help doing the following can someone guide me through the steps please I'm usung ubuntu

PART1 CREATE A FILE STRUCTURE
Recreate the following file structure starting from your home directory.
userid
`lab01a
|-- one
| |-- 1.txt
| `-- three
| |-- 3.txt
| `-- four
| `-- 4.txt
`-- two
|-- 2.txt
`-- five
`-- 5.txt

NOTE:userid represents your vlab userid.

Directories: lab01a, one, two, three, four, five
Text Files: 1.txt, 2.txt, 3.txt, 4.txt, 5.txt

1.txt file content: Linux is an Operating System
2.txt file content: Linux is based on Unix
3.txt file content: vlab uses Fedora8
4.txt file content: cis440 at cis174
5.txt file content: putty.exe is an ssh client application


PART2*COPY SECTION
Under your home folder copy the entire lab01a file structure into lab01b directory with ___________________________________

Write down below the commands used to copy all the text files
found within lab01a into a directory called lab01c:

FILE1:___________________________________________________
FILE2:___________________________________________________
FILE3:___________________________________________________
FILE4:___________________________________________________
FILE5:___________________________________________________

PART3-Relative VS Absolute Addressing
Assume you are in your home directory. Using the information in Part1 above:

What is the absolute path to the file 1.txt?

What is the relative path to the file 2.txt?

What is the absolute path to the file 3.txt?

What is the relative path to the file 3.txt?
 
Old 09-16-2016, 09:48 AM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Whitespace of the attempted ASCII art tree structure did not come through correctly. In order to preserve spacing, and guarantee use of a monospace font (as opposed to a proportional font), use the "code" tags. The result will look something like this:
Code:
      +------+
      |parent|
      +------+
     /        \
+------+    +------+
|child1|    |child2|
+------+    +------+
 
Old 09-16-2016, 10:09 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
This looks like homework.

Look at the mkdir command; i.e., open a console and enter man mkdir. Also look at the man page for the touch command; i.e., man touch, as well as the cat command with redirection.
 
1 members found this post helpful.
Old 09-16-2016, 11:38 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jefinc View Post
i need help doing the following can someone guide me through the steps please I'm usung ubuntu

PART1 CREATE A FILE STRUCTURE
Recreate the following file structure starting from your home directory.
userid
`lab01a
|-- one
| |-- 1.txt
| `-- three
| |-- 3.txt
| `-- four
| `-- 4.txt
`-- two
|-- 2.txt
`-- five
`-- 5.txt

NOTE:userid represents your vlab userid.

Directories: lab01a, one, two, three, four, five
Text Files: 1.txt, 2.txt, 3.txt, 4.txt, 5.txt

1.txt file content: Linux is an Operating System
2.txt file content: Linux is based on Unix
3.txt file content: vlab uses Fedora8
4.txt file content: cis440 at cis174
5.txt file content: putty.exe is an ssh client application


PART2*COPY SECTION
Under your home folder copy the entire lab01a file structure into lab01b directory with ___________________________________

Write down below the commands used to copy all the text files
found within lab01a into a directory called lab01c:

FILE1:___________________________________________________
FILE2:___________________________________________________
FILE3:___________________________________________________
FILE4:___________________________________________________
FILE5:___________________________________________________

PART3-Relative VS Absolute Addressing
Assume you are in your home directory. Using the information in Part1 above:

What is the absolute path to the file 1.txt?

What is the relative path to the file 2.txt?

What is the absolute path to the file 3.txt?

What is the relative path to the file 3.txt?
This is your homework; so YOU need to actually do the work. Tell us what YOU think the answers are, and we can tell you if you're off base or not. But we're not going to do your homework for you...do not ask for handouts. Show some effort of your own.
 
Old 09-16-2016, 03:29 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Can I have your Guacamole recipe?
Actually, can you just make it?

Tease:
Code:
mkdir -pv I/owe/my/parents/a/refund/
touch the files.

Get some!

Last edited by Habitual; 09-16-2016 at 03:37 PM.
 
Old 09-16-2016, 06:24 PM   #6
urbanwks
Member
 
Registered: Sep 2003
Distribution: Slackware64-Current, FreeBSD 12.1, Alpine 5.4, Manjaro 19, Alpine on WSL [Win10]
Posts: 194

Rep: Reputation: 213Reputation: 213Reputation: 213
Only God can make a tree.
 
Old 09-16-2016, 08:11 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
See

Code:
man tree
It should help.

urbanwks, with apologies to Joyce Kilmer:
I think that I shall never see
A poem as lovely as a tree,
But unlovely as this poem may be,
Take it. You don't get no tree.


(Couldn't resist.)
 
1 members found this post helpful.
Old 09-16-2016, 08:17 PM   #8
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:
 mkdir -p
might help a little
man mkdir

Quote:
5.txt file content: putty.exe is an ssh client application
is an invalid file extenion for linux

Last edited by BW-userx; 09-16-2016 at 08:20 PM.
 
Old 09-16-2016, 08:34 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
BW-userx: Putty is an ssh client for use on Windows. It can be used to connect to Linux systems.
 
Old 09-16-2016, 08:36 PM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
BW-userx: Putty is an ssh client for use on Windows. It can be used to connect to Linux systems.
Darn, the only exe files I've seen were viruses.
 
Old 09-17-2016, 10:35 AM   #11
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
Quote:
Originally Posted by frankbell View Post
BW-userx: Putty is an ssh client for use on Windows. It can be used to connect to Linux systems.
well that is just crazy talk... what is windows again? I only remember my mom yelling at me get your head back in from that window. what are you a call girl? never understood that either because I am not a girl. lol

ps thanks for the info, but isn't he using a Linux sys already so that exe file has to be installed on Windows and not linux in order for it to work. therefore one would not see said file on a linux but windows yes?

Last edited by BW-userx; 09-17-2016 at 10:37 AM.
 
Old 09-17-2016, 12:46 PM   #12
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
Write down below the commands used to copy all the text files
found within lab01a into a directory called lab01c:

FILE1:___________________________________________________
FILE2:___________________________________________________
FILE3:___________________________________________________
FILE4:___________________________________________________
FILE5:___________________________________________________
Seems superfluous as it can be done with one command line entry.
 
Old 09-17-2016, 01:03 PM   #13
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by jefinc View Post
1.txt file content: Linux is an Operating System
linux is a kernel; gnu/linux is a system.
Quote:
Originally Posted by jefinc View Post
2.txt file content: Linux is based on Unix
linux is an open-source re-implementation of the unix kernel (without using any unix code as a base).
Quote:
Originally Posted by jefinc View Post
3.txt file content: vlab uses Fedora8
why such an ancient version of fedora ?
Quote:
Originally Posted by jefinc View Post
4.txt file content: cis440 at cis174
5.txt file content: putty.exe is an ssh client application
 
  


Reply



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
[SOLVED] Would mounting a file system 'tree' to /mnt create a bottleneck? linux_walt Linux - Newbie 5 02-05-2015 08:51 PM
[ANN] mk-slack64-multilib : A tool to create slackware64+multilib tree/iso phenixia2003 Slackware 5 12-28-2012 05:42 AM
Using fork() to create a binary tree mashhype Linux - Newbie 3 09-28-2010 01:27 AM
create page of directory tree AAnarchYY Linux - Server 5 10-01-2007 04:26 PM
Unable to create a tar file from spanning a directory tree? R00ts Linux - General 2 11-01-2006 10:15 AM

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

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