LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-22-2018, 08:36 AM   #1
daiyan619
LQ Newbie
 
Registered: Jul 2018
Location: up south
Distribution: what?
Posts: 3

Rep: Reputation: Disabled
Unhappy trying to view contents of a hidden file but says the file doesn't exist?


I'm using an emulated shell on a website called immersive labs, sort of like codeacademy, so please bear this in mind.

The tasks goes as follows:

1. What is the name of the current working directory (done)

2. how many folders are present in the current working directory (done)

3. Navigate to the 'moving-around' folder. What is the name of the hidden file located inside this folder? (done - took a lot of time [ls -a moving-around] which gave .cb75)

4. what is the token contained within the hidden file, from the previous question? (not done)

I am a complete noob at this and haven't ever used linux before. but I appreciate you taking the time to read this

https://imgur.com/a/y1wazfL

Last edited by daiyan619; 07-22-2018 at 10:04 AM. Reason: added a link to show what i'm dealing with.
 
Old 07-22-2018, 08:43 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,153

Rep: Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377
you would need to post not only done/not done, but what did you really try, what's happened and how do you know if that was successful or not.
http://catb.org/~esr/faqs/smart-ques...html#beprecise
 
Old 07-22-2018, 10:05 AM   #3
daiyan619
LQ Newbie
 
Registered: Jul 2018
Location: up south
Distribution: what?
Posts: 3

Original Poster
Rep: Reputation: Disabled
the image shows what i've got so far if that helps

Quote:
Originally Posted by pan64 View Post
you would need to post not only done/not done, but what did you really try, what's happened and how do you know if that was successful or not.
http://catb.org/~esr/faqs/smart-ques...html#beprecise
https://imgur.com/a/y1wazfL
 
Old 07-22-2018, 10:29 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,153

Rep: Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377
you would need to try ls -la instead of ls -a
that will give more info. For example you will see the permissions. Probably you have no right to read that file.
 
Old 07-22-2018, 10:39 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,767

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Permissions may indeed be an issue, but I'm guessing the OP doesn't know how to read (see what's in) a file.

daiyan619, man pages are your friend. See:
Code:
man cat
man less
man more
 
Old 07-22-2018, 10:51 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,153

Rep: Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377
if the file is located in a dir you need to either cd into that dir or use relative path to reach that file:
cat moving-around/.cb75
 
1 members found this post helpful.
Old 07-22-2018, 11:37 AM   #7
daiyan619
LQ Newbie
 
Registered: Jul 2018
Location: up south
Distribution: what?
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
if the file is located in a dir you need to either cd into that dir or use relative path to reach that file:
cat moving-around/.cb75
I cannot thank you enough for this solution, not only have I learnt more about linux from this forum but you have enabled me to unlock the apply button for a beginner cyber security course, thank you so much. I am very grateful
 
Old 07-22-2018, 12:45 PM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,153

Rep: Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377Reputation: 7377
you are welcome. Please mark the thread solved if your problem is solved. Thanks
 
  


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
[SOLVED] sysdig reports dkms.conf file doesn't exist, but manual search clearly finds the config file WFV Linux - Newbie 3 06-21-2017 11:06 PM
[SOLVED] Bash - find something in one file and if it doesn't exist in the second file print. Rogue45 Linux - Newbie 2 08-30-2012 01:17 PM
[SOLVED] View contents of initrd.lz file on live USB? Kenny_Strawn Ubuntu 2 09-07-2010 01:21 AM
Any command to view contents of CD image (iso file) ? lawrence_lee_lee Linux - Software 3 10-10-2007 12:38 AM
trying to redirect text to a file to cat at later point. says file doesn't exist. dr_zayus69 Programming 1 10-02-2005 08:10 AM

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

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