Questions tagged [pwd]

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

149 questions
2
votes
1 answer

How do I find the default HDFS directory and its contents from within Hive Beeline?

I would like to see the contents of an HDFS directory from within Hive Beeline, using an "ls" command. Similarly, I'd like to see what the default HDFS directory is set to, perhaps with a "pwd" command. Is there any way to do this in Beeline, or am…
Glenn Strycker
  • 4,816
  • 6
  • 31
  • 51
2
votes
6 answers

Unix softlinks and paths

I am somewhat confused how soft links work in unix. See the example. % cd /usr/local/ % ls -la total 6 drwxr-xr-x 2 root root 512 Jan 19 15:03 . drwxr-xr-x 41 root sys 1024 Jan 20 16:24 .. lrwxrwxrwx 1 root root …
sixtyfootersdude
  • 25,859
  • 43
  • 145
  • 213
2
votes
3 answers

Renaming files but keeping them in their present subdirectory

I have a script that renames html files based on information in their tags. This script goes through the current directory and all subdirectories and performs this renaming recursively. however, after renaming them it moves them into the current…
2
votes
3 answers

Are there any known issues calling pwd using %x in Ruby 1.9.3?

Recently at work, we encountered a bug in Puppet. I decided to try to fix the bug in my free time. The first step in this process is getting it working using a git clone. I went through the instructions, then I tried to use rake and I started…
mnuzzo
  • 3,529
  • 4
  • 26
  • 29
2
votes
2 answers

List all files in a directory with abosolute paths (excluding directories)

I've currently got: ls -1 $(pwd)/* Gives me all the files in a directory with absolute paths - but formats it with the directory at the start of each list of files. Is there a way just to get a list of files in a directory recursively (absolute…
user191960
  • 1,941
  • 5
  • 20
  • 24
2
votes
1 answer

Failing to use $PWD with sed, bash

I am trying to create a script that replaces sub strings with an absolute path, so I'm using sed s/TEMPDIR/$PWD/ file.py > newfile.py So obviously I want to replace TEMP with the absolute path, but I keep getting sed: -e expression #1, char 12:…
Yotam
  • 9,789
  • 13
  • 47
  • 68
1
vote
3 answers

Printing Present working directory in c using pointers

Aim : Print present working directory in c on Linux machine. Without using pointers, it is giving correct output.. #include #include #include #include int main() { //char buf[1024]; char * buf; char…
Kunal
  • 597
  • 7
  • 19
1
vote
2 answers

Unable to pbcopy at Vim's ED editor

I have tried unsuccessfully to copy the pwd to pbcopy as follows pwd | !pbcopy How can you copy your path in Vim's ED editor (: -mode)?
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
1
vote
1 answer

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 = "AAA" If (Test-Path -Path ($DirPath + "\" + $DirName + "_*")) { …
MikeZetPL
  • 97
  • 5
1
vote
1 answer

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 is going to output the current working directory…
1
vote
1 answer

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 ├── example2.png └── plugin └──…
Manuel
  • 15
  • 3
1
vote
1 answer

pwd zsh: permission denied: /Users/myName

I am new to Python and I wanted to try coldtype to play with variable fonts (https://coldtype.goodhertz.com/install.html), but when I type ~ $ pwd in terminal i get zsh: permission denied: /Users/myName. I already enabled auto_cd in ~/.zshrc but I…
Mia Radic
  • 11
  • 2
1
vote
2 answers

Is there any equivalent of `pwd -L` in perl?

Is there an equivalent of shell's "pwd -L" in perl? I want the current working directory with symlinks unresolved? My current working directory is "/path1/dir1/dir2/dir3", and here dir1 is symlink to test1/test2. I want current working directory to…
PPP
  • 329
  • 1
  • 9
1
vote
2 answers

Get current path when in a symbolic linked directory

When I am in a symbolic liked directory (ln -s ...) and invoke Ruby's Dir.pwd it returns the path of the target directory. I need a way to return the link directory like Linux's pwd do. The following script exemplify my need: #!/bin/bash set -u set…
1
vote
2 answers

Did `pwd` use to have a `-W` option?

I am reviewing the source code for gitflow-avh (A VirtualHome edition), version 1.12.3, which ships with Git for Windows, version 2.31.1. I'm looking at lines 67-73 of the script git-flow. *MINGW*) export GITFLOW_DIR=$(dirname "$(echo "$0" | sed…
adam.hendry
  • 4,458
  • 5
  • 24
  • 51