Skip to main content

All Questions

Tagged with
2 votes
2 answers
3k views

How do I change directory to a path containing spaces in cmder on Windows 10?

I am working with both Docker Quickstart Terminal (Bash) and Cmder on Windows10. On Bash, to change directory to a path where some folder contains spaces, I usually do: cd "D:\my files\etc\etc&...
Tms91's user avatar
  • 182
0 votes
1 answer
60 views

How do you get bash to cd to your previous session directory on login?

I would like to on ssh login, change directory to my previous one. (I'm the only user on my machine).
Quang's user avatar
  • 149
0 votes
1 answer
640 views

How to change into a directory with a space in its name

I have this directory in CS50 IDE called "cs50 web" and want to cd into it. Unfortunately, I can't seem to figure out how... ~/ $ cd cs50 web bash: cd: too many arguments ~/ $ cd cs50-web ...
user avatar
0 votes
2 answers
83 views

Newbie trying to use sources

I am trying to have a simple file which changes the directory where the user currently is. If I run the file using . ./Genesis then the source files works fine. But I want to just use ./Genesis and ...
Ktate's user avatar
  • 3
0 votes
1 answer
3k views

On Git Bash, I get an error `cat: /dev/fd/63: No such file or directory` whenever I run the cd command

I've been trying to find out by this problem is happening, I'm using Windows 10 and this error occurs on Git Bash. Whenever I run the cd command to change the directory, I get the following error: ...
Joe Pena's user avatar
1 vote
0 answers
43 views

Why does `cd /../` not return an error in bash? [duplicate]

In bash (or, I'm assuming, any linux shell), I would expect cd /../ to return an error. I interpret that to be asking for the parent of the root of the directory tree. Since it's the root of the ...
T.C. Proctor's user avatar
0 votes
1 answer
165 views

Basic bash if statement with hg fails

I'm running Cygwin. I came across the following snippet of Bash code from the FFmpeg Wiki's guide to compiling FFmpeg: cd /ffmpeg_sources && if cd x265 2> /dev/null; then hg pull &&...
Hashim Aziz's user avatar
  • 13.1k
0 votes
2 answers
174 views

Bash cd to a directory by just entering its name

Is there a way to get bash to cd to a directory by default if I just enter the directory name? Right now what I get is: ~ bemmu$ some_directory/ -bash: some_directory/: is a directory What I want ...
Bemmu's user avatar
  • 1,048
0 votes
1 answer
379 views

Mac OSX Terminal ls, cd & ditto command return odd results

My MacBook Pro (Retina, 13-inch, Late 2013) running OS X El Capitan has some weird thing going on with terminal and more specifically when I run the ls, cd or ditto commands. I have my disk ...
Sahus Pilwal's user avatar
1 vote
0 answers
350 views

bash change directory with "shortcuts"

On my windows computer I use JPSofts "Take Command" a.k.a. TCMD as command.com or shell replacement. One tcmd feature I really miss when working with bash on Linux/Os X, is the extended directory ...
lexu's user avatar
  • 1,872
1 vote
5 answers
2k views

Go to directory of a file path

Is there a way a cd command may accept a regular file path and jump to the dir where the file resides? Image you could do: vim /usr/share/drupal7/sites/all/modules/legacy/legacy.module cd <alt>...
ptica's user avatar
  • 113
1 vote
3 answers
676 views

Good way to bookmark/navigate relative directory paths?

I work on a linux system with bash 4.x where I frequently find myself navigating different copies of very deep (and large) file directory structures. However, in reality I only need to access a ...
Setjmp's user avatar
  • 357
0 votes
1 answer
433 views

cd into first/second/third directory returned by ls -d */

Say I am in a directory code: /code /very-long-and-descriptive-name If I want to cd into that directory (or a directory if it comes first in alphabetical order), I can just cd *. Now say I add ...
Blue Ice's user avatar
  • 557
2 votes
4 answers
422 views

How to cd to a newly created dir?

cd "$(mkdir -v "$(date -R)"|sed s+.`(.*)'.*)" This is meant to create a dir named $(date -R). I could simply cd $(date -R), but the culprit is the date could change since the previous command was run ...
nnbvcn's user avatar
  • 21
44 votes
15 answers
28k views

Is there a directory history for bash?

Is there something like bash's reverse-search-history (Ctrl-R), but for only directories? I have some deep folder hierarchies that I want to jump to, so I'd like to use something like reverse-search-...
idbrii's user avatar
  • 1,209

15 30 50 per page