Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
while compiling the c++ programs in which i'm using the libxml library it is showing errors at the header files that no file or directory found. I have installed the library but it still showing errors. So i just type the above command after that every thing is working fine but i didn't understand it.
what is the meaning of "../" in UNIX? my command in UNIX is like this "sudo cp -r libxml ../" what it means? how to give relative addresses in UNIX and what are the different wildcard is used.
.. represents the parent directory. For example, if the current directory is /home/user/ the parent directory is /home
. represents the current directory
The command sudo cp -r libxml ../ copies the entire directory libxml in the parent directory.
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 months ago.
Improve this question
ln -s $(ls ../*.txt)
When I do the command above it replay with an error message saying : "ln: target '../foo.txt' is not a directory".
foo.txt is the first file that ls command has found in the parent dir.
I am trying to make symbolic links for all the files in the parent directory which ends with ".txt".
Can you please explain why my command did not work ?
You forgot the directory name to put all the links into. If you want them put into the current directory, use ..
There's also no need to use ls, and you'll get the wrong results if any of the filenames contain whitespace or wildcard characters, because those will be processed in the $(...) output. Just use the wildcard directly.
ln -s ../*.txt .
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 months ago.
Improve this question
I'm trying to list the contents of /usr/bin having "ab" in their names.
I wrote the following command:
ls /usr/bin *ab*
But it didn't work.
Is there any other command that can be used to achieve my purpose?
Thank you.
Your command:
ls /usr/bin *ab*
asks ls to list two things: the contents of the /usr/bin directory as well as any files matching the wildcard *ab* in your current directory. If there aren't any files matching *ab* in your current directory, there's probably an error message before or after the listing of /usr/bin; if there are such files, they'll be listed. Instead, you want:
ls /usr/bin/*ab*
... which asks your shell to give ls the expanded list of files in /usr/bin that match the wildcard.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I want to move/copy a file from the Documents directory into /etc/bind I tried:
sudo mv ~/Documents/Config_Files/db.example.lan /path/to/etc/bind/
I also tried:
sudo mv ~/Documents/Config_Files/db.example.lan /path/to/~//etc/bind/
But also got the error: "No such file or directory"
I am probably being dumb but I double checked spelling capitilisation and everything is correct but still won't come up as a directory.
I can't guide you much but, as you can see we use 'sudo mv' and this means we tell root to move it and you type '~' which means home directory...
So if you type:
sudo mv ~/Documents
this means
sudo mv /root/Documents
instead of
sudo mv /home/<xyz>/Documents
Try to give proper path and let me know if it works.!
example:
sudo mv /home/<username>/Documents/Config_Files/db.example.lan /etc/bind/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Going through this tutorial, I had to execute the command export PATH=~/.local/bin:$PATH
It explained with
This command inserts the path, ~/.local/bin in this example, at the
front of the existing PATH variable.
However, I still don't understand what exactly is happening there. What is the goal/effect of that command?
This command prepend the folder ~/.local/bin (~ is your home folder) to your global variable $PATH (echo $PATH too see it).
Thanks to that, you'll be able to execute program/script stored in the folder ~/.local/bin without typing the full path.
Example, if you have a script myScript.sh in your folder, before adding ~/.local/bin to your $PATH, you can run it with the command:
~/.local/bin/myScript.sh
After adding ~/.local/bin to your $PATH, you can execute it with the command:
myScript.sh
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am currently taking a Computing GCSE, and I have got a Linux Controlled Assessment, and this is one of the tasks:
Create a directory within your home directory. Name it A452. Navigate to your new A452 directory. Type touch mynametextfile, where myname is your
first name.
I tried adding a new folder called A452, and then opening the terminal and typing touch matthewtextfile, but that didn't work. I am very new to Linux, and I tried Wikipedia, so what should I do?
Edit: It turns out that it was in my Home folder, not my newly created one!
try this in your terminal:
$ cd ~ # move to your home directory
$ mkdir A452 # create directory named A452
$ cd A452 # mv to that directory
$ touch mynametextfile # create file "mynametextfile"