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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-05-2023, 12:47 PM   #1
Miro82
LQ Newbie
 
Registered: Dec 2023
Posts: 1

Rep: Reputation: 0
Linux command


Hi All , unfortunately I have to ask very simple and stupid question but since Iam novice I would need an advice . Iam trying to pass one question in HTB academy question . Which command is the best to see the full path ? I tried “pwd” , “readlink” and others but sth is still wrong . Maybe Iam doing sth bad . Thanks
 
Old 12-05-2023, 01:18 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,161
Blog Entries: 6

Rep: Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836
Code:
echo $PATH
You need show your work, what you have tried. The forum won't do your homework questions for you..

Or do mean:
Code:
whereis ls
which ls
Welcome to LQ.
 
Old 12-05-2023, 01:46 PM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,127

Rep: Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373
man pwd
man readlink
I guess you are looking for readlink -f <something>
 
Old 12-05-2023, 08:38 PM   #4
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,407
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
If I understand your question properly, locate may also be an option. See man locate for more.

You may find this thread from Stack Overflow interesting.
 
Old 12-06-2023, 09:37 AM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,846

Rep: Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222
Only a builtin command can properly show builtin commands.
which is a csh builtin.
type is a sh or bash builtin.
So in a sh or bash you better do
Code:
type pwd
 
Old 12-07-2023, 12:52 AM   #6
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 807

Rep: Reputation: 258Reputation: 258Reputation: 258
Code:
printenv PATH
is the civilized way.
 
  


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] [SOLVED] bash script: can echo command, command works if I type, but command doesn't work in script ... why? hopeless_n00b Linux - Newbie 10 07-12-2018 05:57 AM
Command Substitution: $(command) vs `command` penguinbody Linux - Newbie 9 04-15-2016 07:00 AM
Translating windows pscp command to linux scp command help robward Linux - General 2 01-17-2008 06:02 AM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM
unix command to linux command leonidas Linux - General 1 09-10-2004 12:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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