pwd

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)? ...

Windows equivilent to UNIX pwd

How do I find the local path on windows in a command prompt? ...

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 paths) - excluding the directory/sub-directories themselves? ...

Extract the last directory of a pwd output

How do I extract the last directory of a pwd output? I don't want to use any knowledge of how many levels there are in the directory structure. If I wanted to use that, I could do something like: > pwd /home/kiki/dev/my_project > pwd | cut -d'/' -f5 my_project But I want to use a command that works regardless of where I am in the dire...

How does linux-kernel read proc/pid file?

How and Where does linux-kernel read proc/pid file which shows all processes in the system. I found linux-source-2.6.31/fs/proc/ Here there are files, but it is hard to understand because it is really complicated. Can someone knows, how it works? ...

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 38 Jan 19 15:03 java -> /otherDir/java/jdk1.6.0_17 **<- this is a soft link** % ...

What is the `pwd` of a Mac bundled app?

I'm running a GLFW app (that I wrote in C++) I run it as follows: ./prog.app/Contents/MacOS/prog # from the command line However, my code can't read relative-pathed files properly. So I believe what's happening is that this Mac Bundle is changing my current directory. 1) what does it change it to? 2) can I control this? Thanks! ...

How to force an ImportError on development machine? (pwd module)

I'm trying to use a third-party lib (docutils) on Google App Engine and have a problem with this code (in docutils): try: import pwd do stuff except ImportError: do other stuff I want the import to fail, as it will on the actual GAE server, but the problem is that it doesn't fail on my development box (ubuntu). How to make...

How do I change my pwd to the real path of a symlinked directory?

Hi folks. Here's a rather elementary *nix question: Given the following symlink creation: ln -s /usr/local/projects/myproject/ myproject ... from my home directory /home/jvf/, entering the myproject symlink gives me a pwd /home/jfv/myproject/. Now, I would like to enter the parent directory of the directory I've symlinked to, but th...

shell built in pwd versus /bin/pwd

Hi, I would like to know the code implementation of built-in pwd and /bin/pwd especially when the directory path is a symbolic link. Example: hita@hita-laptop:/home$ ls -l lrwxrwxrwx 1 root root 31 2010-06-13 15:35 my_shell -> /home/hita/shell_new/hita_shell hita@hita-laptop:/home$ cd my_shell hita@hita-laptop:/home/my_shell$ pwd...

How to run 'cd' in shell script and stay there after script finishes?

I used 'change directory' in my shell script (bash) #!/bin/bash alias mycd='cd some_place' mycd pwd pwd prints some_place correctly, but after the script finished my current working directory doesn't change. Is it possible to change my path by script? ...