LinuxQuestions.org
Visit Jeremy's Blog.
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 06-06-2021, 11:12 PM   #1
zl3jbb
Member
 
Registered: May 2021
Location: NZ
Posts: 50

Rep: Reputation: Disabled
[SOLVED] Can't find file or directory


Hi apologies as this is likely a common question but the search just keeps returning 504.

Somehow today I lost the ability to cd /into a directory I can clearly see is there with the ls command. It's happened to (/etc/apt). I have spent/wasted an entire afternoon on the web and youtube looking for an answer only to find either very confusing or stupid results. I can still cd ./apt but not just do a cd /apt to move in to it?? I'm sure it's a simple fix with adding a path or alias or something relating to .bash.something, but I am pretty green at this and really need help to return the function of just using the standard cd command to move in to the directory.

I think!? It happened at some point through looking with nano at my source.list to fumble through trying to fix a bunch of apt repository errors for updating... Sooo new at this and it's taking so much time! *arrrgh I have only got half answers to everything and it's doing my head in. I exited from nano and didn't make any changes, so not sure how it got to be broken I'm using Bullseye because my lappy won't run any other distro that I can find, there are other things to fix on the lappy too, but I am making do for the time being and trying to get the basics repaired, before moving on to the other stuff.

Last edited by zl3jbb; 06-07-2021 at 01:42 AM. Reason: Make it make sense after removing a potion to another thread
 
Old 06-06-2021, 11:58 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
This probably should have been two different posts…
Q1:
/etc/apt is not the same as /apt or ./apt
./apt means the directory named apt below the directory you're in.
If you want to cd to /etc/apt, the command is
Code:
cd /etc/apt
 
Old 06-07-2021, 12:49 AM   #3
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,792

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Q1:
Code:
cd apt
is the same as
Code:
cd ./apt
Both are not beginning with a / so are relative to the current path.
The current path is shown with
Code:
pwd
 
Old 06-07-2021, 01:36 AM   #4
zl3jbb
Member
 
Registered: May 2021
Location: NZ
Posts: 50

Original Poster
Rep: Reputation: Disabled
Yea it probably should have been 2 posts, I'll start another for that particular issue. And OMG, talk about noob probs *sigh - Thanks. I must have started out doing it correctly and changed the way I was doing things. Then I went in to a loop hahaha. *embarrassing
 
  


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
shell script to take input from user , a list of directory path into file and enter each directory make changes to file sandeep.c Programming 13 10-08-2020 04:43 PM
How to find and get a file in an entire directory with an excluded directory specified BudiKusasi Linux - Newbie 5 03-01-2018 09:29 AM
find the largest and smallest file in a directory and sub directory schandran Programming 5 05-06-2015 09:53 AM
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
Can`t find C-compiler in Debian ,or at least can`t find one that can make executables hemmelig Linux - Software 4 05-26-2008 03:07 AM

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

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