FAQ Database Discussion Community


How can I save the path to a frequently used directory in UNIX?

unix,cd
Is there a way to save the path to a frequently used directory in UNIX, so instead of having to manually cd /path/to/directory I can just enter a shortcut cd myFavoritePath ??

Why can't I access my vi folder?

mongodb,path,terminal,root,cd
I keep getting this error on my terminal which stops me accessing the vi folder. I've been trying to set a path to the MongoDB bin and when experimenting on how to do this, I think I've broken the folder. Can someone please help? Last login: Mon May 18 10:31:54...

Error when using python to change directories in script

python,path,cd
I am creating a program that will convert files. My main issue is that I need my program to change the working directory. I have the code for that, but it keeps saying that there is: OSError: [Errno 2] No such file or directory: Do you guys have any ideas....

open directory with a variable bash shell

bash,shell,variables,cd
I'am reading in a variable that will contain a version of a certain file (Ex.: V1.0.10) by the following command. read Version and there is a possibility that that variable contains dots and I remove them by the next command: New_Version=`echo $Version | sed -e 's/\.//g'` but if I use...

What is the difference between ~directory_name and /directory_name in linux

osx,shell,cd
I am using a Mac OS 10.10.3 and I am new to using linux commands. This is the doubt I have- The present working directory: /dir_name when I run this command: cd ~ The directory path changes to: ~dir_name What does the ~ or / change in the directory path...

Why shell returned a Python error traceback when I `cd` into python-skeleton dir

python,zsh,cd
I installed Pycharm via HomeBrew cask on my OS X 10.10. I heard python-skeleton is something useful so cded into it to find what does it have. But every time I type cd /opt/homebrew-cask/Caskroom/pycharm/4.5/PyCharm.app/Contents/helpers/python-skeletons/ gets this traceback: Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 548, in <module> main() File...

generate a path to go backward a given path

shell,cd
Assuming I have the following relative path: MY_PATH := first/second/third I am searching for a preferably short shell command to achieve the following: MY_NEW_PATH := ../../.. How to do this?...

how to edit existing debian package in installation cd?

installation,debian,package,edit,cd
ive been trying to edit a Debian installation CD, followed tutorial on debian website https://wiki.debian.org/DebianInstaller/Modify/CD, successfully extract cd, use genisoimage to recreate iso, try to install debian, no problem. and then the problem, when i tried to edit one of the package, say i want to change a picture in...

Is there a way to go two directories back in cygwin (linux)?

terminal,cygwin,cd
I know that you can go back one directory in cygwin by using the dash (-). But, how do you go back more than one directory in your history? I've tried cd -- it doesn't seem to work. Thanks! This would be very very helpful. ...