How can a single file system object be both a symlink and a directory?How does linux work with symbolic...
How can this shape perfectly cover a cube?
Background for black and white chart
I sent an angry e-mail to my interviewers about a conflict at my home institution. Could this affect my application?
Why are backslashes included in this shell script?
Why is gun control associated with the socially liberal Democratic party?
How to represent jealousy in a cute way?
How can I detect if I'm in a subshell?
Past vs. present tense when referring to a fictional character
Is it possible to have battery technology that can't be duplicated?
Harley Davidson clattering noise from engine, backfire and failure to start
Can an escape pod land on Earth from orbit and not be immediately detected?
Why does there seem to be an extreme lack of public trashcans in Taiwan?
Are athletes' college degrees discounted by employers and graduate school admissions?
Why is Skinner so awkward in Hot Fuzz?
My parents claim they cannot pay for my college education; what are my options?
Why is my Taiyaki (Cake that looks like a fish) too hard and dry?
Why is it bad to use your whole foot in rock climbing
What is the color associated with lukewarm?
Purpose of cylindrical attachments on Power Transmission towers
Is fission/fusion to iron the most efficient way to convert mass to energy?
Why did Robert pick unworthy men for the White Cloaks?
Boss making me feel guilty for leaving the company at the end of my internship
Am I allowed to determine tenets of my contract as a warlock?
Why did the Death Eaters wait to reopen the Chamber of Secrets?
How can a single file system object be both a symlink and a directory?
How does linux work with symbolic links?open a file using CDPATH and symlinkSymlink Copy a Directory Non-recursivelyHow to Create Symlink Dynamically for Dynamically Created File in a FolderHow to copy directory structure without removing symlinks?How can I create a relative symlink given a relative path?How can I backup directory and files including all sub directory and files using shell script?Can I replace a directory with a symlink without write permissions in parent?What idempotent command can I use to make a symlink pointing to a directory?How to chdir to symlink source and not target in .screenrc
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
When I "ls" it -- its a directory with a bunch of files in it. But when I "ls -l" it --- its a symlink to something thats NOT a directory (see image below). What's going on -- how is it possible ?
$ ls /sys/class/net/enp0s20u1/device/driver/module
coresize holders initstate refcnt srcversion uevent
drivers initsize notes sections taint
$
$ ls -l /sys/class/net/enp0s20u1/device/driver/module
lrwxrwxrwx 1 root root 0 Jun 13 05:24 /sys/class/net/enp0s20u1/device/driver/module -> ../../../../module/cdc_ether
$
$ readlink /sys/class/net/enp0s20u1/device/driver/module
../../../../module/cdc_ether
$
$ ls `readlink /sys/class/net/enp0s20u1/device/driver/module`
ls: cannot access '../../../../module/cdc_ether': No such file or directory
bash symlink
add a comment |
When I "ls" it -- its a directory with a bunch of files in it. But when I "ls -l" it --- its a symlink to something thats NOT a directory (see image below). What's going on -- how is it possible ?
$ ls /sys/class/net/enp0s20u1/device/driver/module
coresize holders initstate refcnt srcversion uevent
drivers initsize notes sections taint
$
$ ls -l /sys/class/net/enp0s20u1/device/driver/module
lrwxrwxrwx 1 root root 0 Jun 13 05:24 /sys/class/net/enp0s20u1/device/driver/module -> ../../../../module/cdc_ether
$
$ readlink /sys/class/net/enp0s20u1/device/driver/module
../../../../module/cdc_ether
$
$ ls `readlink /sys/class/net/enp0s20u1/device/driver/module`
ls: cannot access '../../../../module/cdc_ether': No such file or directory
bash symlink
Please post the contents as text rather than a screenshot.
– l0b0
17 mins ago
What's impossible about it?ls
dereferences the symlink by default, and doesn't forls -l
.
– muru
1 min ago
add a comment |
When I "ls" it -- its a directory with a bunch of files in it. But when I "ls -l" it --- its a symlink to something thats NOT a directory (see image below). What's going on -- how is it possible ?
$ ls /sys/class/net/enp0s20u1/device/driver/module
coresize holders initstate refcnt srcversion uevent
drivers initsize notes sections taint
$
$ ls -l /sys/class/net/enp0s20u1/device/driver/module
lrwxrwxrwx 1 root root 0 Jun 13 05:24 /sys/class/net/enp0s20u1/device/driver/module -> ../../../../module/cdc_ether
$
$ readlink /sys/class/net/enp0s20u1/device/driver/module
../../../../module/cdc_ether
$
$ ls `readlink /sys/class/net/enp0s20u1/device/driver/module`
ls: cannot access '../../../../module/cdc_ether': No such file or directory
bash symlink
When I "ls" it -- its a directory with a bunch of files in it. But when I "ls -l" it --- its a symlink to something thats NOT a directory (see image below). What's going on -- how is it possible ?
$ ls /sys/class/net/enp0s20u1/device/driver/module
coresize holders initstate refcnt srcversion uevent
drivers initsize notes sections taint
$
$ ls -l /sys/class/net/enp0s20u1/device/driver/module
lrwxrwxrwx 1 root root 0 Jun 13 05:24 /sys/class/net/enp0s20u1/device/driver/module -> ../../../../module/cdc_ether
$
$ readlink /sys/class/net/enp0s20u1/device/driver/module
../../../../module/cdc_ether
$
$ ls `readlink /sys/class/net/enp0s20u1/device/driver/module`
ls: cannot access '../../../../module/cdc_ether': No such file or directory
bash symlink
bash symlink
edited 3 mins ago
muru
39.5k595171
39.5k595171
asked 23 mins ago
explorestexplorest
305128
305128
Please post the contents as text rather than a screenshot.
– l0b0
17 mins ago
What's impossible about it?ls
dereferences the symlink by default, and doesn't forls -l
.
– muru
1 min ago
add a comment |
Please post the contents as text rather than a screenshot.
– l0b0
17 mins ago
What's impossible about it?ls
dereferences the symlink by default, and doesn't forls -l
.
– muru
1 min ago
Please post the contents as text rather than a screenshot.
– l0b0
17 mins ago
Please post the contents as text rather than a screenshot.
– l0b0
17 mins ago
What's impossible about it?
ls
dereferences the symlink by default, and doesn't for ls -l
.– muru
1 min ago
What's impossible about it?
ls
dereferences the symlink by default, and doesn't for ls -l
.– muru
1 min ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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
});
}
});
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%2funix.stackexchange.com%2fquestions%2f524578%2fhow-can-a-single-file-system-object-be-both-a-symlink-and-a-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux 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%2funix.stackexchange.com%2fquestions%2f524578%2fhow-can-a-single-file-system-object-be-both-a-symlink-and-a-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
Please post the contents as text rather than a screenshot.
– l0b0
17 mins ago
What's impossible about it?
ls
dereferences the symlink by default, and doesn't forls -l
.– muru
1 min ago