How to ignore case in directory paths?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I’m new to Linux/Ubuntu. To my knowledge it’s not possible to make file or folder with only difference in case e.g. I can’t create the files Text.ini
and text.ini
(well you can but it will not work, it gives you an error), so why does the terminal care about case when you write path to something e.g. cd folder/folder
but if the second folder
starts with capital F then command doesn’t work?
In Windows it doesn’t matter with capital letters or not it works, so is there any way for the terminal to ignore case if the names are correct?
command-line case-insensitive
add a comment |
I’m new to Linux/Ubuntu. To my knowledge it’s not possible to make file or folder with only difference in case e.g. I can’t create the files Text.ini
and text.ini
(well you can but it will not work, it gives you an error), so why does the terminal care about case when you write path to something e.g. cd folder/folder
but if the second folder
starts with capital F then command doesn’t work?
In Windows it doesn’t matter with capital letters or not it works, so is there any way for the terminal to ignore case if the names are correct?
command-line case-insensitive
2
This is the difference between Windows and Ubuntu (any Linux). Ubuntu file and folder names are case sensitive. That isText.ini
andtext.ini
are indeed two different files.
– user68186
Apr 2 at 16:47
2
In Unices you can very well do e.g.touch Text.ini text.ini
, this will create these files and not throw any error because file (and directory) names are case-sensitive. To my knowledge there’s no easy way to change that behaviour. Are you asking for a way for just thebash
shell to ignore case in filenames?
– dessert
Apr 2 at 16:47
See askubuntu.com/questions/590364/changing-directory
– user68186
Apr 2 at 16:50
add a comment |
I’m new to Linux/Ubuntu. To my knowledge it’s not possible to make file or folder with only difference in case e.g. I can’t create the files Text.ini
and text.ini
(well you can but it will not work, it gives you an error), so why does the terminal care about case when you write path to something e.g. cd folder/folder
but if the second folder
starts with capital F then command doesn’t work?
In Windows it doesn’t matter with capital letters or not it works, so is there any way for the terminal to ignore case if the names are correct?
command-line case-insensitive
I’m new to Linux/Ubuntu. To my knowledge it’s not possible to make file or folder with only difference in case e.g. I can’t create the files Text.ini
and text.ini
(well you can but it will not work, it gives you an error), so why does the terminal care about case when you write path to something e.g. cd folder/folder
but if the second folder
starts with capital F then command doesn’t work?
In Windows it doesn’t matter with capital letters or not it works, so is there any way for the terminal to ignore case if the names are correct?
command-line case-insensitive
command-line case-insensitive
edited Apr 2 at 17:50
dessert
25.7k674108
25.7k674108
asked Apr 2 at 16:42
ForisForis
31
31
2
This is the difference between Windows and Ubuntu (any Linux). Ubuntu file and folder names are case sensitive. That isText.ini
andtext.ini
are indeed two different files.
– user68186
Apr 2 at 16:47
2
In Unices you can very well do e.g.touch Text.ini text.ini
, this will create these files and not throw any error because file (and directory) names are case-sensitive. To my knowledge there’s no easy way to change that behaviour. Are you asking for a way for just thebash
shell to ignore case in filenames?
– dessert
Apr 2 at 16:47
See askubuntu.com/questions/590364/changing-directory
– user68186
Apr 2 at 16:50
add a comment |
2
This is the difference between Windows and Ubuntu (any Linux). Ubuntu file and folder names are case sensitive. That isText.ini
andtext.ini
are indeed two different files.
– user68186
Apr 2 at 16:47
2
In Unices you can very well do e.g.touch Text.ini text.ini
, this will create these files and not throw any error because file (and directory) names are case-sensitive. To my knowledge there’s no easy way to change that behaviour. Are you asking for a way for just thebash
shell to ignore case in filenames?
– dessert
Apr 2 at 16:47
See askubuntu.com/questions/590364/changing-directory
– user68186
Apr 2 at 16:50
2
2
This is the difference between Windows and Ubuntu (any Linux). Ubuntu file and folder names are case sensitive. That is
Text.ini
and text.ini
are indeed two different files.– user68186
Apr 2 at 16:47
This is the difference between Windows and Ubuntu (any Linux). Ubuntu file and folder names are case sensitive. That is
Text.ini
and text.ini
are indeed two different files.– user68186
Apr 2 at 16:47
2
2
In Unices you can very well do e.g.
touch Text.ini text.ini
, this will create these files and not throw any error because file (and directory) names are case-sensitive. To my knowledge there’s no easy way to change that behaviour. Are you asking for a way for just the bash
shell to ignore case in filenames?– dessert
Apr 2 at 16:47
In Unices you can very well do e.g.
touch Text.ini text.ini
, this will create these files and not throw any error because file (and directory) names are case-sensitive. To my knowledge there’s no easy way to change that behaviour. Are you asking for a way for just the bash
shell to ignore case in filenames?– dessert
Apr 2 at 16:47
See askubuntu.com/questions/590364/changing-directory
– user68186
Apr 2 at 16:50
See askubuntu.com/questions/590364/changing-directory
– user68186
Apr 2 at 16:50
add a comment |
1 Answer
1
active
oldest
votes
It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line
set completion-ignore-case on
to /etc/inputrc
and start a new terminal. After that,
cd foldTab/foldTab
will get you to the correct directory even if the second
folder
is in reality Folder
. You'll see the autocompletion change the directory name on the fly accordingly.add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f1130672%2fhow-to-ignore-case-in-directory-paths%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line
set completion-ignore-case on
to /etc/inputrc
and start a new terminal. After that,
cd foldTab/foldTab
will get you to the correct directory even if the second
folder
is in reality Folder
. You'll see the autocompletion change the directory name on the fly accordingly.add a comment |
It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line
set completion-ignore-case on
to /etc/inputrc
and start a new terminal. After that,
cd foldTab/foldTab
will get you to the correct directory even if the second
folder
is in reality Folder
. You'll see the autocompletion change the directory name on the fly accordingly.add a comment |
It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line
set completion-ignore-case on
to /etc/inputrc
and start a new terminal. After that,
cd foldTab/foldTab
will get you to the correct directory even if the second
folder
is in reality Folder
. You'll see the autocompletion change the directory name on the fly accordingly.It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line
set completion-ignore-case on
to /etc/inputrc
and start a new terminal. After that,
cd foldTab/foldTab
will get you to the correct directory even if the second
folder
is in reality Folder
. You'll see the autocompletion change the directory name on the fly accordingly.edited Apr 2 at 19:40
dessert
25.7k674108
25.7k674108
answered Apr 2 at 18:07
Teemu ToivolaTeemu Toivola
46435
46435
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1130672%2fhow-to-ignore-case-in-directory-paths%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
2
This is the difference between Windows and Ubuntu (any Linux). Ubuntu file and folder names are case sensitive. That is
Text.ini
andtext.ini
are indeed two different files.– user68186
Apr 2 at 16:47
2
In Unices you can very well do e.g.
touch Text.ini text.ini
, this will create these files and not throw any error because file (and directory) names are case-sensitive. To my knowledge there’s no easy way to change that behaviour. Are you asking for a way for just thebash
shell to ignore case in filenames?– dessert
Apr 2 at 16:47
See askubuntu.com/questions/590364/changing-directory
– user68186
Apr 2 at 16:50