Stack Overflow for Teams is moving to its own domain! When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on stackoverflow.com.
Check your email for updates.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
On Windows, it seems that if the user has read/write permission to the lev5 directory, but no permission at all for all its ancestors, cd c:\lev1\lev2\lev3\lev4\lev5 still works.
On Linux, even if I ...
When I launch xterm with the following command:
xterm -e 'cd ~' -hold
A new xterm window pops up saying: xterm: Can't execvp cd ~: No such file or directory
After which the xterm window is still in my ...
Perhaps a pedantic question, but is there a convention on where to cd if I want to move the current directory to somewhere else. (It can't be moved while being inside it)
I guess / (root) would do as ...
So let's set up the context. Two paths:
I create a symbolic link in /myhome and then cd into it:
/myhome $ ln -s /some/very/convoluted/path/...
This question is actually derived from a problem I have with a python library which deletes a file tree and then recreates the content, but on attempt of execution of a file inside the directory, the ...
For some reason, every time I need to go to passwd or even shadow, It does not allow me.
Output: cd: not a directory: /etc/passwd
Same thing with shadow. Because of this, ...
Below is a small extract of my code for you to have a better visibilty on my problem. As each file in the directory enters the loop, the value of em is extracted from the filename and compared with ...
We recently migrated from HP-UX B.11.31 to Linux 3.10.0-1160.15.2.el7.x86_64.
I am trying to achieve the below (which worked in the earlier HP-UX system):
I'm preparing headers for a C++ project and I decided to use find to get include option to other header files. To list the right path, I need to use cd with it, like:
On MacOS terminal with bash, I get an ls after a cd. When the directory contains many files, I can't see the effect of the cd since it scrolls away due to the ls.
This is what I see
$ which cd
cd is a ...
I came across a cool way to go up more than 1 directory level by adding a function to the .bashrc file.
It is done by just opening the .bashrc file and inserting the function:
#user defined functions
Firstly come background I am trying to write an executable shell script I can easily map as the default for .tgz files to auto-extract.
so far so simple
tar -xzvf $1
which works to drag/drop but not ...
Is there any way to get a list of the most recent 'places' (directories) that have been navigated in terminal (osx)? I mean, I'd like to open my terminal, type some command, get the last 2 or 3 places ...
How do I change to a near-identical path with a different low-level parent? If you’re working in for instance ~/foobar/foo/data/images/2020/01/14/0001/ and need to get to the same path in bar instead ...
I am trying to make an executable script on Mac where it makes the directory it is housed in the current directory (cd) and then runs some more commands. I started with a find command however in the ...
Every time I need to go to a new directory I give the command cd and the name of the directory and ls to see the contents inside it. Is there any method or command to directly go the directory of my ...
I was in my home directory and then I typed
For a weird moment, I typed
I do not know why I made that mistake, but since ../.. was my home directory
I know these questions might have been asked somewhere but their solutions don't really work. I need help.
I want to add a variable to a directory name then change directory to it. The approach below ...
In the cd, bash help page:
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is ...
I have workspace with many folders which all are consisted of long paths. For example:
|-- // 20 more folders