Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 months ago.
Improve this question
Is there any way I can integrate cd command with read?
read -p "location" loc
cd /home/dir/$loc
Yes, you can; it's not pretty, but it works. :)
cd /home/dir/$( read -p "location" loc; echo $loc)
It's also a bit costly as it invokes a sub-shell.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I would like to make a python script that would do some work with interfaces file in Linux.
How I may make this script executable in Linux? I would to open it with sudo and it would do some commands in terminal.
Make callable
chmod u+x <filename here>
first line in file with shebang to determine how the script should be executed:
#!/usr/bin/python3
execute with
./<filename here>
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to make cross compiler. And I commend like tar xvjf arm-linux-gcc-3.3.2.tar.bz2. But when ls /usr/local/arm there is nothing. arm directory doesn't exsist.... I dont know what to do.....
The command that you have there:
tar xvjf arm-linux-gcc-3.3.2.tar.bz2
extracts that archive within the directory you are currently in. So, if you expect things to show in /usr/local/arm ... you have to copy them there!
Thats about it - see here!
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Guys What is a more efficient way of doing the following using auto-complete?
cd
ls
cd bar
ls
cd baz
ls
cd basilio
Try ls -R from the outermost folder, that will recursively list all content.
You haven't specified in which SHELL. In BASH you can do double-tab to see what are your options:
cd [TAB] [TAB] type first few letters [TAB] to complete.
Similar - but better - completion is implemented in ZSH.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am attempting to run something for a class.
-bash-4.1$ w330=/network_shares/w_drive/c\ s/CJohnson/cs330
-bash-4.1$ cd .. && $w330/freql/test_freql
-bash: /network_shares/w_drive/c: No such file or directory
From the looks of it, it doesn't seem to be recognizing any of the directory name after the c even though i did a \ for the space? What's going on here? Why is it just stopping after the c?
Use this instead: w330="/network_shares/w_drive/c s/CJohnson/cs330"
and this: "$w330/freql/test_freql"
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've worked all night on this, but haven only solved part of the problem. I am trying to copy all files using the * wildcard that contain the word file in the filename into the work directory.
try doing this :
cp *file* ./work/
cp *file* work/
Is this homework?