Questions tagged [cd-command]
Is for questions about `cd` built-in bash command (e.g. how it works).
97
questions
2
votes
1
answer
903
views
cd command in terminal takes too long time to execute
When I try to navigate directories using the cd command, it takes way too a long time. And terminal suggests creating a config file to increase the timeout. Once my terminal hanged, I mean when I ...
0
votes
1
answer
436
views
Cannot cd into directory even though group has permissions
I'm aware that there are other similar questions, but nothing in there solved my issue.
gitlab-runner@my-machine:~$ groups
gitlab-runner my-user
gitlab-runner@my-machine:~$ sudo ls -l /home
total 16
...
0
votes
0
answers
60
views
There are files on my Desktop, but none are listed in Ubuntu
I am new to Ubuntu.
I just installed it and want to use it to open a file on my Desktop. I navigated to /home/username/Desktop in the terminal, but no files appear. It's the same with all other ...
0
votes
0
answers
10
views
What does the command `~man cd` mean? [duplicate]
I accidentally ran the command ~man cd in the terminal and it returned
bash: /var/cache/man: Is a directory leaving me scratching my head. What is the meaning of the output here? cd is a shell-builtin ...
0
votes
1
answer
329
views
How to "cd $variable" when the variable tries to add "\" before spaces (path contain spaces)?
My bash script registers its own path so it can return to its own folder after doing a cd somewhere (kinda if it explores a different forest and is able to relocate its house).
And if the path have ...
0
votes
0
answers
136
views
Mount drive and cd into a folder
I have my work files on a different drive. Every time I want to work on it, I have to click through files -> Other locations -> /dev/sda2. Then run the terminal in there. I am wondering if this ...
0
votes
2
answers
170
views
cd with variable not working [duplicate]
I am trying to assign a directory name to a variable and use that variable to create and change the directory.
dir_name='tmp'
mkdir $dir_name
cd $dir_name
How to change directory?
0
votes
0
answers
228
views
Using tar command to backup file
I am using a live cd to take backup of a file.This was my problem.
Now I want to use tar to backup a single file Phone academics where I have accumulated other files and I want to create the backup in ...
0
votes
1
answer
198
views
BASH: Given a partial directory name ... how to cd into that directory
Having trouble with a bash script.
I need to cd into a directory using a partial name such as binutil where the full directory name might be binutil-2.36.
I need to do this so that as each package ...
0
votes
1
answer
448
views
How do I stop cd command from printing absolute path everytime?
I edited my .bashrc to add more directories to $CDPATH. It looks like this:
export CDPATH=".:~:~/LEI/2_ano/2_smt:~/LEI/2_ano/1_smt"
But now every time I use the cd command, it prints the ...
0
votes
2
answers
122
views
Folder navigation - VLC folder
Hi im a fairy new linux user
Im trying to navigate to the lua folder in vlc.
When i type
whereis vlc
It said:
vlc: /usr/bin/vlc /usr/lib/x86_64-linux-gnu/vlc /usr/share/vlc /snap/bin/vlc /usr/share/...
1
vote
1
answer
105
views
`cd ..` command takes me to the Trash directory
I was surprised when this happened and am trying to understand under what circumstances this is possible.
I am using Ubuntu 20.04.
1
vote
0
answers
1k
views
cd /media/[user]/[external hdd]: Permission denied
I don't have permission to cd into my own external hard drive. sudo cd is not a syntactically legal command (tried it). What is going on?
1
vote
1
answer
230
views
Why does the current directory not change after executing script? [duplicate]
A script is executed from the shell as ./oximeter.
The script, oximeter, has 5 commands:
python3 ~/Documents/oximeter/3211ipod.py
ls -l
pwd
cd ~/Documents/oximeter/
pwd
The python script runs as ...
-1
votes
1
answer
160
views
How to create a new directory and switch into it from the command line? [closed]
Using the command line, how can I create new directory and navigate into it?
For example, I would like to create a new directory named CSIS536 under my home directory, and change to the directory.
1
vote
1
answer
57
views
New to Ubuntu Desktop for windows
I have done several searches to determine how to change to my C drive in windows when using Ubuntu Desktop for Windows.
Can someone point me to a manual or tutorial where I can learn how to navigate ...
0
votes
1
answer
5k
views
I need to cd into directory with spaces `-bash: cd: too many arguments`
The error code is -bash: cd: too many arguments.
I am currently using Windows Subsystem running ubuntu 16.04
I tried using a backslash('\') and then the space(' ') , but it is still throwing me the ...
-1
votes
1
answer
8k
views
Directory locations when using WSL
I'm new to the Ubuntu world and I need some help. (Windows 10, Ubuntu 18.04 LTS, x64 system type)
I created a directory called "Submarine" using this :
mkdir Submarine
I want the directory "...
2
votes
0
answers
170
views
Change directory problem in ksh
I work with Ubuntu 18.04.3
My current directory is /home/hans/bin, The directory /home/hans/.sshz also exist. My shell is "ksh."
The command cd ../.ssh give the output.
ksh cd: /home/hans/ssh:[No ...
3
votes
2
answers
306
views
Why doesn't system() work when called in a loop with cd and rm commands?
I started using Linux recently, so my program is just for learning. Having said that, here's my code:
#include <stdio.h>
#include <stdlib.h>
int main () {
FILE *fin;
char buf[200];
fin ...
0
votes
2
answers
53
views
giving the command in the directory where the file is located [duplicate]
Stupid question time!
I've been toying around with Ubuntu for a couple hours and most of the programs I need are working just fine, but now I'm not sure how to install something.
[...] giving the ...
0
votes
1
answer
2k
views
Home no such file or folder in terminal
I'm trying to go to Downloads directory, the dir is showing in the list but not able to open it in terminal.
ajl1254@ajl1254:/home$ ls ~/
Desktop Downloads Music Public Templates
...
0
votes
2
answers
1k
views
File / Folder navigation problem with the 'cd' command [duplicate]
I used to use this command cd /Foldername to navigate the folder.
But I am facing a problem with this now I need to use this command cd ~/foldername for navigating.
Please have a look on the screen ...
0
votes
1
answer
146
views
cd-command not operating even with capitalized letters used in bash
Hey everyone I need help with my cd command as it is not working. I typed:
cd Downloads
and it won't work, I'm trying to install something and it's giving me this as a response.
-bash: cd: ...
4
votes
2
answers
2k
views
Can't cd to a (passed) variable in bash script
I am using bash to get some information from audacious to conky for display (including album art). I get the path to the directory of the music file from audacious, then attempt to cd to that ...
3
votes
3
answers
34k
views
-bash: cd: Desktop: No such file or directory
I'm trying to type:
cd Desktop
from the /root directory, but when I do it comes up with the error:
-bash: cd: Desktop: No such file or directory
What am I doing wrong?
4
votes
2
answers
76
views
Examine a folder named `-F/` [duplicate]
I think this folder was probably created by accident at some point, but I can't ls or cd to it to check.
Things I have tried:
ls '-F'
ls "-F"
ls \-F
ls \\\-F
ls \\-F
and the cd equivalents
0
votes
3
answers
16k
views
How to elevate privileges to root in bash and return back?
How to elevate privileges to root in bash? And then how to return back to exactly the previous state? My question is both about elevating/decreasing privileges and possible troubles with some apps, ...
0
votes
1
answer
41
views
If you cd to a different user's home and run an apt install command does that do anything special?
If you cd to a different user's home and run an apt install command does that do anything special?
I know, I know, this sounds dumb. My base instinct is to say : "No, obviously!"
but then I saw ...
15
votes
3
answers
3k
views
Why doesn't using two cd commands in bash script execute the second command?
I have written a bash script which creates a series of directories and clones a project to selected directories.
For that, I need to cd to each directory (project 1 and project 2), but the script ...
0
votes
1
answer
2k
views
Backslash at start of file path?
When using the cd command at the terminal, I get a 'no such directory' error if I type something like
cd /directory/whatever/
But when I type something like
cd \directory/whatever/
It works just ...
0
votes
3
answers
557
views
Shortcut to `cd` into the 2nd folder in a directory
How to cd into the 2nd folder in a directory?
CONTEXT
I am in a directory with 3 folders.
After executing ls -1 they are ordered like so.
folder1
folder2
folder3
I want to quickly cd into ...
2
votes
1
answer
102
views
What can mess up the order of the tab completion
I am experiencing a difference of behavior between my previous OS (Ubuntu Xenial) and my current one (Ubuntu Bionic).
The short story is this:
When using tab completion with cd, the order of the tab ...
0
votes
0
answers
42
views
Why my terminal opens a dir without cd today?
I'm on Xubuntu 18.04, and everytime I typed vim in the terminal, It opened vim editor. But today, It opens a directory named vim! what can cause that? I just changed my font size from 14 to 13 ...
3
votes
1
answer
4k
views
Can not change directory. Completely new at Ubuntu
I am really new at ubuntu and I'm trying to set my directory to a certain file.
Whenever I set it to the folder with all my C++ files it says No such file or directory
I type in cd /home/ and that ...
12
votes
4
answers
4k
views
How do I prevent 'cd' command from going to home directory?
The thing is that sometimes I type cd by mistake and that take me to the home directory.
e.g. I'm in a directory that have a hidden directory and a visible directory, I quickly press cd+tab and that ...
0
votes
1
answer
3k
views
How to change directory
When I try to change my working directory to C:\Users\Michell Payano\Desktop\Data Analytics Tools, the result is -bash: cd: too many arguments. I want to know what is wrong.
8
votes
3
answers
3k
views
Error when using the commands cd.. and cd. in the terminal [duplicate]
I try to use the commands cd.. and cd. in the terminal to move from my current folder to a previous one, and it shows me a message that the command doesn't exist...
What could the problem be? I'm ...
0
votes
2
answers
2k
views
Can I make USB stick with exfat-fuse case sensitive?
I have a USB stick for which I had to install exfat-fuse, and have mirrored my home diectory onto it for backup purposes with rsync. I have a folder called Documents and I notice I cannot cd documents ...
-3
votes
1
answer
170
views
Why can't I access this folder?
Why can't I access the folder /website1?
juozas@personal:/opt/lampp/htcdocs$ ls
website1
juozas@personal:/opt/lampp/htcdocs$ cd /website1
bash: cd: /website1: No such file or directory
juozas@...
1
vote
0
answers
29
views
What happened when I typed cd // [duplicate]
I accidentally typed cd // instead of cd .. and something weird happened.
The directory // doesn't exist, what's going on here exactly.
root@root:/var/www/html# cd //
root@root://# pwd
//
root@root://...
-2
votes
1
answer
133
views
Why does `//` only display for first level directories? [duplicate]
For the root directory a // will display in the prompt:
───────────────────────────────────────────────────────────────────────────────
rick@alien:~$ cd /
─────────────────────────────────────────────...
2
votes
3
answers
2k
views
Make array of commands for a script
I have several directories that I need to update, and the steps are the same, except, obviously, that every directory has different names.
I'm new to making scripts. Can I make an array with e.g. $...
8
votes
2
answers
530
views
Command cd behavior [duplicate]
Since ubuntu 17.10, my scripts don't work the same way they used to do:
cd a*
would change directory to the first directory beginning with a.
Now, I get this error:
bash: cd: too many arguments
I ...
5
votes
2
answers
4k
views
How to change into directory owned by root if I have sudo? [duplicate]
I have a deploy user that has sudo privledges.
I can't sudo cd into the directory, but I can list it like:
sudo ls /root
How can I cd into the folder, or is that not possible?
5
votes
1
answer
5k
views
'Permission denied' when I cd into any folder
Whenever I try cd folder_name/ in bash on any directory it gives this error:
-bash: cd: folder_name/: Permission denied
Execution permissions are given to all folders so that doesn't seem to be the ...
1
vote
1
answer
866
views
Setting CDPATH environment variable
"export CDPATH=/usr", like this I want to manipulate CDPATH environment variable. Then I can't be sure it is the same as before when I put "export CDPATH=." on the command line and enter. So, I want ...
1
vote
1
answer
3k
views
No such file or directory when I try to cd to a directory with two words in the name [duplicate]
I am trying to untar a file and to do so, I have to go to the directory in terminal.
So as in the screenshot above, My downloads are stored in Downloads/Chrome Downloads. But when I type the ...
0
votes
1
answer
492
views
cd command is not working
So every time I try to navigate to a directory it gives me this message but when I navigated to my desktops directory it did just that
-3
votes
1
answer
64k
views
cd command is not functioning in Terminal "desktop: No such file or directory" [duplicate]
I have been trying to access a folder to install a program and I keep receiving the following error message:
bash: cd: *: No such file or directory
I then tried accessing the desktop with the ...