Can't cd into a specific directory
See original GitHub issue- Describe the current behavior:
%%bash
date_dir=`date +"%y-%m-%d"` # Use linux date command to get today's date and initialize to the `date_dir` variable
mkdir -p $date_dir # Make a new directory (if it doesn't already exist) and assign the name as the value of the `date_dir` variable
cd "`ls -t | head -1`" # This is supposed to list all elements in the current directory, sorted newest first,
# only take the newest element and change directory into the newest element
- Describe the expected behavior:
The cd command isn’t working on Google Colab, but this command works on my local linux machine.
- The web browser you are using (Chrome, Firefox, Safari, etc.):
This behavior has been seen on Google Chrome and Firefox.
- Link to self-contained notebook that reproduces this issue (click the Share button, then Get Shareable Link):
Copy/Paste the aforementioned Jupyter code in a notebook to reproduce this issue
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why can't I cd into a directory? - Server Fault
A good quick solution is to use $HOME instead of ~ . While ~ is not expanded even within double-quotes, $HOME is. So...
Read more >Can't cd into my own directory? - Super User
Show activity on this post. Yes, you need execute permission on a directory to “traverse” it—that is, to do anything with its contents....
Read more >having trouble with cd and getting back to a directory
This error message simply means that the directory/file you specified could not be found at your current location. If you look to the...
Read more >files - Cannot cd into directory because of permission, but ...
So I changed them with runnign chmod -x {dirs and files} . Because I have done all the installation and the moving the...
Read more >How to Fix CD Command Not Working in CMD Windows 10
E:. Check how to change directory in CMD (Command Prompt) by using CD command in Windows 10. Detailed Command Prompt change directory guide....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No, there’s no reasonable way for the child (bash) process to affect the state of the parent process.
So I’m currently using the following:
and wanted to implement the same concept using the
%
cell magic, but am unable to do so as of writing…Any advice?