LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-11-2014, 10:22 PM   #1
AnttilaTheHun
LQ Newbie
 
Registered: May 2014
Posts: 2

Rep: Reputation: Disabled
Unhappy Complete noob, I need help on creating a tree. Please Help!


Hey guys, a complete noob to linux here. I have to write a script that redirects a tree output that shows ownership, subdirectories and files and append a Long List showing the rights at each folder level and append commands to show the members (I have 10 sudo users in 4 separate groups) of each group and append the passwd file to a file called FinalTree.txt.

Can someone please help me on this, I am stuck
 
Old 05-12-2014, 12:56 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Hi Anttila and welcome to LQ.
Can you show us what you've done so far and where exactly your problem lies. This will narrow things down and make our comments more relevant to your specific problem.
Quote:
Can someone please help me on this, I am stuck
So where exactly are you stuck?
jdk

Last edited by jdkaye; 05-12-2014 at 11:41 AM.
 
Old 05-12-2014, 02:18 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by AnttilaTheHun View Post
I have to write a script that redirects a tree output that shows ownership, subdirectories and files and append a Long List showing the rights at each folder level
If you want to see details (file-type, owner, group, permission, size, modified date & time etc)of directories and it's subdirectories, use
Code:
# cd /path/of/directory
# ls -lR
Example
Code:
cd ~/Desktop | ls -lR >> ~/details.txt
It will save all details of desktop's files and directories into a file details.txt in your home directory.
 
Old 05-12-2014, 09:42 AM   #4
AnttilaTheHun
LQ Newbie
 
Registered: May 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
This is what I have done so far,

Using the command line create a file structure under your home starting with a folder linuxwi

Under FinalLab Have four directories called SemesterI, SemesterII, SemesterIII, and SemesterIV.
Under each Semester Folder create two folders called 2014 and 2015.

Create Ten users Tom Jones, Joan Tomie, Anna Smith, Kelly Keefer, Mary Frostman, Shane Evenson, Paul Gordon, Amanda Hellman, Greg Heathman, Laura Jasper. Use First Initial and last name for user account. Make sure their complete name is added to their acount.
Create four groups and put the following people in the groups:


GROUP MEMBERS
Accounting Tom, Joan, Laura, Kelly
PayRoll Tom, Shane, Amanda, Greg
Shipping Mary, Paul
Receiving Laura, Greg, Kelly

Assign the Group rights as follows;
Full rights at the SemesterI and SemesterII folder, no one else should have rights.
Read rights on all 2014 folders.
Read rights on all 2015 folders
RW rights on SemesterIII and SemesterIV folders.

Change the owner of the SemesterI folder to Kelly.
Create two files in each of the 2014 folders called text1 and text2. Put your name in each file and give the owner full rights, the group and other Read and Write rights.

Last edited by AnttilaTheHun; 05-12-2014 at 09:51 AM.
 
Old 05-12-2014, 10:20 AM   #5
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
It looks like a college assignment.
Now my question is same.
So where exactly are you stuck?
 
  


Reply


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
Bad root block 0. (--rebuild-tree did not complete) matten_emu Linux - Newbie 0 05-21-2008 05:58 AM
ftp download other server complete tree + packaging gomanza Fedora 7 10-06-2006 01:53 PM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 01:03 AM
Complete noob roban LinuxQuestions.org Member Intro 2 07-26-2003 07:41 AM
SuSE 8.1 ftp complete directory tree size? cav Linux - General 2 04-01-2003 01:44 PM


All times are GMT -5. The time now is 06:59 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