Skip to main content

Questions tagged [pwd]

`pwd` is a shell command for "print working directory". When issued, it prints the path of the current working directory.

-1 votes
1 answer
30 views

Getting the working directory if the script is a soft link

I have two folders. Call them A and B. A is populated with python code. Among them, function1.py. B contains data, and a soft link (created using ln -s) to A/function1.py. When I execute B/function1....
user2751530's user avatar
0 votes
1 answer
39 views

Why is it I don't get pwd result from this dart code?

I'd like to get the result of my command line 'pwd' from my Dart console program. I wait for the process to start, install the listeners and wait for the task to complete. I don't get the result ...
Stéphane de Luca's user avatar
1 vote
1 answer
36 views

Octave can't find any folders

When I run very simple code, octave returns that the Folder does not exist, but I'm pretty sure it exists. I can't grasp what I'm doing wrong. function TestLoading(path) if isfolder(path) ...
krzysztof jagła's user avatar
0 votes
2 answers
48 views

Keep bash cwd the same directory as cwd of Powershell that spawned it

I have a Powershell session that creates bash session to run a script like so C:\msys64\usr\bin\bash -lc './super_duper_script.sh Where the super_duper_script.sh is in the cwd of Powershell session. ...
Olumide's user avatar
  • 5,717
0 votes
3 answers
60 views

absolute path if PWD itself is a symlink

I have following folder structure created via mkdir -p foo subdir/bar && ln -s subdir/bar bar ├── bar -> subdir/bar ├── foo └── subdir └── bar when working in bar folder: How can I ...
Totschi's user avatar
  • 91
0 votes
1 answer
109 views

How to get pwd relative path in bash without first slash

I am writing a small Bash script to do some automatic commands. In particular , i would like to get relative path without first '/' in pwd pwd : Users\hp\OneDrive\Desktop insted of pwd : \Users\hp\...
Ahmad Gamal's user avatar
0 votes
2 answers
337 views

How do I display only the current directory name and not the entire path (pwd) shown in fish/tile prompt?

Good morning, please I installed fish (version 3.6.1) with tide (version 5.5.1) on Debian. I configured tide with the following options selected ... Prompt Style (3) Rainbow Prompt Colors ...
CAmechi's user avatar
  • 11
0 votes
0 answers
66 views

Wrong PWD when splitting window in tmux while in git diff

When running git diff in a tmux window and I split the window, I expect the newly created pane to use the same working directory. Here are my bindings to split the window: unbind % bind | split-window ...
Jan's user avatar
  • 33
0 votes
1 answer
932 views

Run bash script in current directory Linux

Why can't I run a bash script in the current directory I'm in? Whenever I run the script the commands are executed in the home directory. The only answers I found are included below. I do use the zsh ...
Janek Eilts's user avatar
1 vote
1 answer
358 views

Check is [wildcard] Folder exist and set is as variable

I have this bellow command to check is folder contains name "AAA_*" in path "C:\Test" exist and if so - make from it name variable: $DirPath = "C:\Test" $DirName = "...
MikeZetPL's user avatar
  • 109
0 votes
3 answers
64 views

running subprocess with combined cd and pwd

I run subprocess in jupyter to get the core path. I have to go one folder up and then call pwd Running: import subprocess mypath=subprocess.run("(cd .. && pwd)") leads to a "No ...
Florida Man's user avatar
  • 2,121
1 vote
1 answer
885 views

How to get the current path with symlink (not the actual path) in a c program on a linux system?

I am currently building a custom shell that can handle a few internal and external commands along with their options. One of these internal commands is pwd. From the man page of pwd, I got that pwd -L ...
Aspect Karlos's user avatar
0 votes
1 answer
35 views

Qbs cannot get PWD file on MacOS

I want to use my script as cpp.compilerWrapper: ["../../script"] I'm using relative path (from my .qbs file) to point the script. It works OK na linux. but on macOS doesn't. Also when I'm ...
AnDevi's user avatar
  • 81
0 votes
1 answer
1k views

How do get the working directory after a cd in a makefile?

I just need to be able to assign the value of pwd after cd to a variable so I can open a file in my web browser, but I can't seem to figure out how to do that in a Makefile. Interestingly, when ...
Zip's user avatar
  • 71
1 vote
1 answer
684 views

vim - how to set fix path as working directory

I have this issue. Let's suppose I have the following directory tree: diffchar/ ├── README.md ├── autoload │ └── diffchar.vim ├── demo.gif ├── doc │ ├── diffchar.txt │ └── tags ├── example1.png ├...
Manuel's user avatar
  • 15

15 30 50 per page
1
2 3 4 5
11