Efficient way of using auto complete in Linux [closed] - linux

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.

Related

How do I find the root of the directory I'm currently in for Linux [closed]

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
like if I'm in a directory called makefile_assignment, what command would give me the higher up directories and display it like
/home/linux/ieng6/cs80w/public/makefile_assignment
I believe you're looking for:
pwd
Just the environment variable of $PWD
echo $PWD
The pwd command is what you are looking for.
The command is pwd (present working directory).
Usually, echo $PWD also works and produces the same answer.
pwd #present working directory
cd / #to your root directory

Linux directory with space? [closed]

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"

Linux command line....How do I change from $ to #? [closed]

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'm working with the sed editor and I realize that my command prompt is:
[darkchild#localhost ~]$
How can I change this so that it ends in #....and what does this mean?
for example:
[darkchild#localhost ~]#
A friend told me to write this command #!/bin/bash but it does not change the prompt to #.
Can someone educate me?
Canonically # means root shell. You probably do not actually want to do this, because it would confuse other users of your system. If you do actually want to do this, you can edit the PROMPT variable.
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/
You can run the following command:
set prompt=\[`id -nu`#`hostname -s`\]\#\
This is the root user. You can go to this user using the su command.
More info: http://en.wikipedia.org/wiki/Su_(Unix)

difference in outputs of pwd and /bin/pwd [closed]

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 created a soft link from my home folder to /etc/ by using
"ln -s /etc/ foo"
then i changed directory to foo
"cd foo"
now i executed the following two commands
"pwd" and "/bin/pwd"
Both gave me different outputs.
The output of "pwd" was /home/myhome/foo and of "/bin/pwd" was /etc.
I am not able to understand the difference in the outputs although both commands are the same.
Possibly a bit oversimplified, but the bash builtin pwd tracks cd commands, so when you cd through a symbolic link, it remembers that. On the other hand, /bin/pwd walks the directory tree back to the root, and, as such, has no idea what symbolic links you might have walked through to get where you are.

How to make Linux shell command stack store only unique commands [closed]

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 11 years ago.
Improve this question
I just reformated my HD and had to overwrite my /home partition. Everything is fine in Linux Mint 11.
Except that the command stack recall with cursor up/down displays repeats of the same command.
Like:
ls
ls
ls
cd ~
should be:
ls
cd ~
Any ideas how to fix this?
Assuming you're using bash:
export HISTIGNORE="&"
I assume you're using bash.
Add this to to your ~/.bashrc
HISTCONTROL=ignoreboth

Resources