Questions tagged [pwd]
`pwd` is a shell command for "print working directory". When issued, it prints the path of the current working directory.
151
questions
-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....
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 ...
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)
...
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. ...
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 ...
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\...
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 ...
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 ...
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 ...
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 = "...
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 ...
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 ...
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 ...
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 ...
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
├...