running a command called showtree

Matt_coder11

New Member
Joined
Dec 3, 2020
Messages
1
Reaction score
0
Credits
17
Hello everyone, I am a new member of this community and just joined today. I just wanted some help on a question I have been stuck on for a few days. So previously I was prompted to make a symbolic link to
ln -s ~uli101/2020c/sample_dir3/linked_directories/sample_files samples. Now it says I have to do this:

"There is a command called 'showtree' in the directory you just linked to.
Execute this command using the newly created 'samples' link"

in a previous question I did create the newly samples link, which was called sample_files. It's prompting me to execute this command now using a showtree command. Here are a fewe methods I have tried first:

ls -l ~uli101/2020c/sample_dir3/linked_directories/sample_files

showtree ~uli101/2020c/sample_dir3/linked_directories/sample_files

those are the only 2 methods I thought would work, but its a no go. Can someone help me out
 


Don't know about "showtree", but many Linux's have a command simply called "tree".
This will show directories, subdirectories, and even links.
 
@dos2unix @Matt_coder11
Welcome Matt,
Nice to see another new face around here.
I agree with dos2unix entirely.
Here's part of the 'tree' entry in the terminal:
Screenshot at 2020-12-03 13-31-06.png

This is just the tip of the iceberg. There are about 1200 more files listed besides these.
Hope this helps.
Old Geezer,
Tango Charlie
 
  • Like
Reactions: Rob
to give an example :
Code:
ln -s wiki_pentesting.txt myfile.txt
here i make a softlink from a textfile called wiki_pentesting.txt to myfile.txt

in a directory there is an "eclectic" mix of files , lets list them:

Code:
bash-5.0$ tree -l -L 1 
.
├── Hair_conditioner.jpg
├── Lotion.jpg
├── face_toner.jpg
├── face_toner_two.jpg
├── fask_mask1.jpg
├── lotion.jpg
├── make_menuconfig.jpg
├── make_running.jpg
├── myfile.txt -> wiki_pentesting.txt
├── noneTestImage.txt
├── slug.gif
├── toner.jpg
├── waiter.gif
└── wiki_pentesting.txt

you will see myfile.txt -> wiki_pentesting.txt so it shows link
 
@dos2unix @70 Tango Charlie @captain-sensible

You're overthinking and overcomplicating things and needlessly confusing the poor chap.

If you read @Matt_coder11 's question again, the information is all there.
1. He has set up a soft symbolic link to a directory with a really long path in the current working directory.
2. The name of the sym-link is samples.
3. The showtree command is in that sym-linked samples directory.

In which case, in order to run the command via the sym-link you would simply use:
Bash:
./samples/showtree
Assuming that the sym-link is in the current working directory

The only other alternative would be to use the original, impractically long path for the original directory:
Bash:
~/uli101/2020c/sample_dir3/linked_directories/sample_files/showtree

Simple!
 
AFAIK, there IS no Linux command

showtree

If I am mistaken, please let me know what Family or Distribution it is used in. TIA.

I am also curious with the resemblance between the OP's question, and this link

https://ca.answers.yahoo.com/questi...FTNW_owoFd9IJ66PX6aFXFragVvgnMJmPfJGfRWYWXbwy

Can that be read? It was from a search (Google) under

linux command showtree

Moving this to Linux Command Line

Cheers

Wizard
 
AFAIK, there IS no Linux command

showtree

If I am mistaken, please let me know what Family or Distribution it is used in. TIA.

I am also curious with the resemblance between the OP's question, and this link

https://ca.answers.yahoo.com/questi...FTNW_owoFd9IJ66PX6aFXFragVvgnMJmPfJGfRWYWXbwy

Can that be read? It was from a search (Google) under

linux command showtree

Moving this to Linux Command Line

Cheers

Wizard

Wiz, I have no idea what this showtree script/command/executable is.
It could be a script or program that the OP's professor/teacher wrote, or it could be from somewhere else.

At the end of the day, it doesn't really matter what it is.
It is stated in the OP's post that the showtree script/command is inside the directory which the OP made a sym-link to.
The question they were stuck on was how to run the showtree script/command.
Which I answered in my previous post.

Regarding the link you posted - yes it looks related. And it's from six years or so ago. So it's probably somebody who did the same course that the OP is on.
 
Last edited:

Staff online


Latest posts

Top