Navigating through USB drive with “cd /myOtherFolder” causes “no such directory” errorGhost USB...
Can throughput exceed the bandwidth of a network
Why is it "take a leak?"
Arrow between lines in the align environment
Levi-Civita symbol: 3D matrix
Is the withholding of funding notice allowed?
How to kill a localhost:8080
Pure Functions: Does "No Side Effects" Imply "Always Same Output, Given Same Input"?
A bug in Excel? Conditional formatting for marking duplicates also highlights unique value
In Adventurer's League, is it possible to keep the Ring of Winter if you manage to acquire it in the Tomb of Annihilation adventure?
How can atoms be electrically neutral when there is a difference in the positions of the charges?
How to create specific language package for an item?
How do you say "powers of ten"?
Why did John Williams use a march to symbolise Indiana Jones?
When was drinking water recognized as crucial in marathon running?
Is there a math equivalent to the conditional ternary operator?
Rationale to prefer local variables over instance variables?
What is this waxed root vegetable?
How to play ethic aspects my character is said to have, I as player don't understand?
Why can't we make a perpetual motion machine by using a magnet to pull up a piece of metal, then letting it fall back down?
USB C PD fast power role swap
If nine coins are tossed, what is the probability that the number of heads is even?
I can't die. Who am I?
What is the difference between a forward slip and a side slip?
Canadian citizen, on US no-fly list. What can I do in order to be allowed on flights which go through US airspace?
Navigating through USB drive with “cd /myOtherFolder” causes “no such directory” error
Ghost USB drives left behind when power is cycled off and onRPi does not work with USB thumb drive anymoreExternal USB drive changes to read-onlyDoes PI go to sleep or does it stop supply to USB if the drive is not being used for some time?usb 1-1.2: device not accepting address 44, error -71USB Mass Storage Gadget - how to convincingly emulate a flash drive?Ghost USB drives left behind when power is cycled off and onProblems booting rpi 3 from USB disk driveUsing source command in bashPython script run from crontab does not recognize USB drive mounted laterPhysically Identify a faulty USB drive on the Pi (3B+)
When navigating the file system of my USB drive in the terminal, some weird things happen that didn't used to happen on my Raspberry Pi B+. I'm not quite sure how to articulate this, so I'll just show what is
I open the command line and navigate to my USB drive with
cd /media/pi/MYUSB/
I use
cd
to enter a folder of the USB drive withcd /myFolder/myOtherFolder
I navigate backwards to
myFolder
withcd ..
I try to navigate again to
myOtherFolder
withcd /myOtherFolder
. However, this raises the bash errorbash: cd: /myOtherFolder: no such file or directory
I have no idea what or why this is happening, but I used to be able to do this without the error message. Sometimes I have power outages that cause the Raspberry Pi to shut off with the USB drive in it, so I have "ghost USB drives" like the ones described in Ghost USB drives left behind when power is cycled off and on.
usb bash
New contributor
add a comment |
When navigating the file system of my USB drive in the terminal, some weird things happen that didn't used to happen on my Raspberry Pi B+. I'm not quite sure how to articulate this, so I'll just show what is
I open the command line and navigate to my USB drive with
cd /media/pi/MYUSB/
I use
cd
to enter a folder of the USB drive withcd /myFolder/myOtherFolder
I navigate backwards to
myFolder
withcd ..
I try to navigate again to
myOtherFolder
withcd /myOtherFolder
. However, this raises the bash errorbash: cd: /myOtherFolder: no such file or directory
I have no idea what or why this is happening, but I used to be able to do this without the error message. Sometimes I have power outages that cause the Raspberry Pi to shut off with the USB drive in it, so I have "ghost USB drives" like the ones described in Ghost USB drives left behind when power is cycled off and on.
usb bash
New contributor
add a comment |
When navigating the file system of my USB drive in the terminal, some weird things happen that didn't used to happen on my Raspberry Pi B+. I'm not quite sure how to articulate this, so I'll just show what is
I open the command line and navigate to my USB drive with
cd /media/pi/MYUSB/
I use
cd
to enter a folder of the USB drive withcd /myFolder/myOtherFolder
I navigate backwards to
myFolder
withcd ..
I try to navigate again to
myOtherFolder
withcd /myOtherFolder
. However, this raises the bash errorbash: cd: /myOtherFolder: no such file or directory
I have no idea what or why this is happening, but I used to be able to do this without the error message. Sometimes I have power outages that cause the Raspberry Pi to shut off with the USB drive in it, so I have "ghost USB drives" like the ones described in Ghost USB drives left behind when power is cycled off and on.
usb bash
New contributor
When navigating the file system of my USB drive in the terminal, some weird things happen that didn't used to happen on my Raspberry Pi B+. I'm not quite sure how to articulate this, so I'll just show what is
I open the command line and navigate to my USB drive with
cd /media/pi/MYUSB/
I use
cd
to enter a folder of the USB drive withcd /myFolder/myOtherFolder
I navigate backwards to
myFolder
withcd ..
I try to navigate again to
myOtherFolder
withcd /myOtherFolder
. However, this raises the bash errorbash: cd: /myOtherFolder: no such file or directory
I have no idea what or why this is happening, but I used to be able to do this without the error message. Sometimes I have power outages that cause the Raspberry Pi to shut off with the USB drive in it, so I have "ghost USB drives" like the ones described in Ghost USB drives left behind when power is cycled off and on.
usb bash
usb bash
New contributor
New contributor
edited yesterday
200_success
187118
187118
New contributor
asked 2 days ago
Henry WestfallHenry Westfall
484
484
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You put a leading / to your path names! That's the root directory, meaning what you write next is an absolute path.
Your /myFolder/myOtherFolder is not on your USB if it's mounted inside /media/pi/MYUSB/ anyway.
But you can use cd myOtherFolder
in the case you're asking. I suggest reading some basic tutorial about Linux's (or Unix) file handling, filesystems, and such.
New contributor
add a comment |
To go into a bit more detail —
Whether you come from a Windows or Mac OS X background, you will be used to external drives being independent places from your hard disk (more or less).
Part of Unix tradition is "avoid special cases wherever possible". For instance in Unix (and GNU/Linux), a keyboard is represented as a file that can be opened and read from just like a text file. So is a serial port (which can be written to as well). On a Raspberry Pi even the GPIO pins can be controlled like this. There is a file called /dev/zero
that produces a sequence of 0-bytes when you read it. Etc.
This was a brilliant idea as it allowed programs to be constructed without having all sorts of special cases.
Anyway, in a similar tradition, there is one directory structure for the entire system, starting at /
(the root directory). No special cases, no "drive letters". Just /
.
Drives can be "attached" somewhere in this structure using the mount
command (an Raspberry Pi is configured to do this automatically, but you can also do it manually).
Every file's path descends from /
in some way (for example, /home/pi/test.txt
). Because of this, a path starting with /
is assumed to be an "absolute" path, starting from the root directory of the entire system. Without the /
at the start, it is considered a "relative" path, i.e. it starts from the current directory.
Two other tricks—you probably know that a path starting with ..
refers to the parent directory. A path starting with ~
starts from your home directory, e.g. ~/test.txt
works the same no matter what your current directory is.
New contributor
3
For completeness, a path starting with.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typingfoo
will cause the$PATH
to be searched, and the first directory listed in it that contains a file namedfoo
will be executed. But typing./foo
instructs the shell to explicitly look in the current directory rather than search$PATH
.
– Monty Harder
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("schematics", function () {
StackExchange.schematics.init();
});
}, "cicuitlab");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "447"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Henry Westfall is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f94877%2fnavigating-through-usb-drive-with-cd-myotherfolder-causes-no-such-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You put a leading / to your path names! That's the root directory, meaning what you write next is an absolute path.
Your /myFolder/myOtherFolder is not on your USB if it's mounted inside /media/pi/MYUSB/ anyway.
But you can use cd myOtherFolder
in the case you're asking. I suggest reading some basic tutorial about Linux's (or Unix) file handling, filesystems, and such.
New contributor
add a comment |
You put a leading / to your path names! That's the root directory, meaning what you write next is an absolute path.
Your /myFolder/myOtherFolder is not on your USB if it's mounted inside /media/pi/MYUSB/ anyway.
But you can use cd myOtherFolder
in the case you're asking. I suggest reading some basic tutorial about Linux's (or Unix) file handling, filesystems, and such.
New contributor
add a comment |
You put a leading / to your path names! That's the root directory, meaning what you write next is an absolute path.
Your /myFolder/myOtherFolder is not on your USB if it's mounted inside /media/pi/MYUSB/ anyway.
But you can use cd myOtherFolder
in the case you're asking. I suggest reading some basic tutorial about Linux's (or Unix) file handling, filesystems, and such.
New contributor
You put a leading / to your path names! That's the root directory, meaning what you write next is an absolute path.
Your /myFolder/myOtherFolder is not on your USB if it's mounted inside /media/pi/MYUSB/ anyway.
But you can use cd myOtherFolder
in the case you're asking. I suggest reading some basic tutorial about Linux's (or Unix) file handling, filesystems, and such.
New contributor
New contributor
answered 2 days ago
NyosNyos
45125
45125
New contributor
New contributor
add a comment |
add a comment |
To go into a bit more detail —
Whether you come from a Windows or Mac OS X background, you will be used to external drives being independent places from your hard disk (more or less).
Part of Unix tradition is "avoid special cases wherever possible". For instance in Unix (and GNU/Linux), a keyboard is represented as a file that can be opened and read from just like a text file. So is a serial port (which can be written to as well). On a Raspberry Pi even the GPIO pins can be controlled like this. There is a file called /dev/zero
that produces a sequence of 0-bytes when you read it. Etc.
This was a brilliant idea as it allowed programs to be constructed without having all sorts of special cases.
Anyway, in a similar tradition, there is one directory structure for the entire system, starting at /
(the root directory). No special cases, no "drive letters". Just /
.
Drives can be "attached" somewhere in this structure using the mount
command (an Raspberry Pi is configured to do this automatically, but you can also do it manually).
Every file's path descends from /
in some way (for example, /home/pi/test.txt
). Because of this, a path starting with /
is assumed to be an "absolute" path, starting from the root directory of the entire system. Without the /
at the start, it is considered a "relative" path, i.e. it starts from the current directory.
Two other tricks—you probably know that a path starting with ..
refers to the parent directory. A path starting with ~
starts from your home directory, e.g. ~/test.txt
works the same no matter what your current directory is.
New contributor
3
For completeness, a path starting with.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typingfoo
will cause the$PATH
to be searched, and the first directory listed in it that contains a file namedfoo
will be executed. But typing./foo
instructs the shell to explicitly look in the current directory rather than search$PATH
.
– Monty Harder
yesterday
add a comment |
To go into a bit more detail —
Whether you come from a Windows or Mac OS X background, you will be used to external drives being independent places from your hard disk (more or less).
Part of Unix tradition is "avoid special cases wherever possible". For instance in Unix (and GNU/Linux), a keyboard is represented as a file that can be opened and read from just like a text file. So is a serial port (which can be written to as well). On a Raspberry Pi even the GPIO pins can be controlled like this. There is a file called /dev/zero
that produces a sequence of 0-bytes when you read it. Etc.
This was a brilliant idea as it allowed programs to be constructed without having all sorts of special cases.
Anyway, in a similar tradition, there is one directory structure for the entire system, starting at /
(the root directory). No special cases, no "drive letters". Just /
.
Drives can be "attached" somewhere in this structure using the mount
command (an Raspberry Pi is configured to do this automatically, but you can also do it manually).
Every file's path descends from /
in some way (for example, /home/pi/test.txt
). Because of this, a path starting with /
is assumed to be an "absolute" path, starting from the root directory of the entire system. Without the /
at the start, it is considered a "relative" path, i.e. it starts from the current directory.
Two other tricks—you probably know that a path starting with ..
refers to the parent directory. A path starting with ~
starts from your home directory, e.g. ~/test.txt
works the same no matter what your current directory is.
New contributor
3
For completeness, a path starting with.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typingfoo
will cause the$PATH
to be searched, and the first directory listed in it that contains a file namedfoo
will be executed. But typing./foo
instructs the shell to explicitly look in the current directory rather than search$PATH
.
– Monty Harder
yesterday
add a comment |
To go into a bit more detail —
Whether you come from a Windows or Mac OS X background, you will be used to external drives being independent places from your hard disk (more or less).
Part of Unix tradition is "avoid special cases wherever possible". For instance in Unix (and GNU/Linux), a keyboard is represented as a file that can be opened and read from just like a text file. So is a serial port (which can be written to as well). On a Raspberry Pi even the GPIO pins can be controlled like this. There is a file called /dev/zero
that produces a sequence of 0-bytes when you read it. Etc.
This was a brilliant idea as it allowed programs to be constructed without having all sorts of special cases.
Anyway, in a similar tradition, there is one directory structure for the entire system, starting at /
(the root directory). No special cases, no "drive letters". Just /
.
Drives can be "attached" somewhere in this structure using the mount
command (an Raspberry Pi is configured to do this automatically, but you can also do it manually).
Every file's path descends from /
in some way (for example, /home/pi/test.txt
). Because of this, a path starting with /
is assumed to be an "absolute" path, starting from the root directory of the entire system. Without the /
at the start, it is considered a "relative" path, i.e. it starts from the current directory.
Two other tricks—you probably know that a path starting with ..
refers to the parent directory. A path starting with ~
starts from your home directory, e.g. ~/test.txt
works the same no matter what your current directory is.
New contributor
To go into a bit more detail —
Whether you come from a Windows or Mac OS X background, you will be used to external drives being independent places from your hard disk (more or less).
Part of Unix tradition is "avoid special cases wherever possible". For instance in Unix (and GNU/Linux), a keyboard is represented as a file that can be opened and read from just like a text file. So is a serial port (which can be written to as well). On a Raspberry Pi even the GPIO pins can be controlled like this. There is a file called /dev/zero
that produces a sequence of 0-bytes when you read it. Etc.
This was a brilliant idea as it allowed programs to be constructed without having all sorts of special cases.
Anyway, in a similar tradition, there is one directory structure for the entire system, starting at /
(the root directory). No special cases, no "drive letters". Just /
.
Drives can be "attached" somewhere in this structure using the mount
command (an Raspberry Pi is configured to do this automatically, but you can also do it manually).
Every file's path descends from /
in some way (for example, /home/pi/test.txt
). Because of this, a path starting with /
is assumed to be an "absolute" path, starting from the root directory of the entire system. Without the /
at the start, it is considered a "relative" path, i.e. it starts from the current directory.
Two other tricks—you probably know that a path starting with ..
refers to the parent directory. A path starting with ~
starts from your home directory, e.g. ~/test.txt
works the same no matter what your current directory is.
New contributor
edited 2 days ago
Peter Mortensen
1,81911117
1,81911117
New contributor
answered 2 days ago
ArteliusArtelius
1911
1911
New contributor
New contributor
3
For completeness, a path starting with.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typingfoo
will cause the$PATH
to be searched, and the first directory listed in it that contains a file namedfoo
will be executed. But typing./foo
instructs the shell to explicitly look in the current directory rather than search$PATH
.
– Monty Harder
yesterday
add a comment |
3
For completeness, a path starting with.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typingfoo
will cause the$PATH
to be searched, and the first directory listed in it that contains a file namedfoo
will be executed. But typing./foo
instructs the shell to explicitly look in the current directory rather than search$PATH
.
– Monty Harder
yesterday
3
3
For completeness, a path starting with
.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typing foo
will cause the $PATH
to be searched, and the first directory listed in it that contains a file named foo
will be executed. But typing ./foo
instructs the shell to explicitly look in the current directory rather than search $PATH
.– Monty Harder
yesterday
For completeness, a path starting with
.
refers to the current directory. This is important when one wishes to run a command stored in the current directory: Simply typing foo
will cause the $PATH
to be searched, and the first directory listed in it that contains a file named foo
will be executed. But typing ./foo
instructs the shell to explicitly look in the current directory rather than search $PATH
.– Monty Harder
yesterday
add a comment |
Henry Westfall is a new contributor. Be nice, and check out our Code of Conduct.
Henry Westfall is a new contributor. Be nice, and check out our Code of Conduct.
Henry Westfall is a new contributor. Be nice, and check out our Code of Conduct.
Henry Westfall is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Raspberry Pi Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f94877%2fnavigating-through-usb-drive-with-cd-myotherfolder-causes-no-such-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown