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.
This post was edited and submitted for review last month and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
How to create a link to an existing file or directory using a GNU Linux shell command?
Symbolic or soft link (files or directories, more flexible and self documenting)
# Source Link
ln -s /home/jake/doc/test/2000/something /home/jake/xxx
Hard link (files only, less flexible and not self documenting)
# Source Link
ln /home/jake/doc/test/2000/something /home/jake/xxx
More information: man ln
/home/jake/xxx is like a new directory. To avoid "is not a directory: No such file or directory" error, as #trlkly comment, use relative path in the target, that is, using the example:
cd /home/jake/
ln -s /home/jake/doc/test/2000/something xxx
you should use :
ln -s /home/jake/doc/test/2000/something xxx
Related
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
I am trying to delete all files in my directory "XYZ" without using find command in bash on Linux.
Use the following command:
rm -f XYZ/*
If you want to delete also subdirectories, use:
rm -fr XYZ/*
If you also want to delete the directory, use
rm -fr XYZ
If you want to delete all files in a directory, go into the directory and execute: rm -f *
Why would find even enter into it? use rm -r XYZ to recursively remove the directory XYZ.
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 using opensuse for my production environment.
I am login as "test" user and trying to edit a file using "vi" but when i am going to save
that file it shows the following error
**
E138: Can't write viminfo file /home/test/.viminfo
**
Under the "test" user all the files and folder autometically become read-only.
I am trying to change the permission using "root" user but unable to change it.
also I look for temp file like "~/.viminf*" but there nothing like this.
Don't know what to do plaese help....
anyone aware about this problem
Fix your home directory owner and permissions.
sudo chown -R test /home/test
sudo chmod u+rw -R /home/test
And finally check that no old temp files were left behind (e.g. ~/.viminf*) and that you can write in the directory of the .viminfo file.
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.
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
i'm trying to move folders to another folders using command line, with overwrite if already exists, but i got error "Is a directory" when using mv..
example:
mv src/test/ dest/
there are many files and folders on src/test/, there are also some files and some folders on dest/
and i want files and folders on dest/ replaced with files and folder from src/test/ if exists, example:
src/test/bla/boo replaces dest/bla/boo
src/test/bla/bla/boo replaces dest/bla/bla/boo
also, everytime one file transfer completed, that one file deleted from src/test/
and overall transfer progress bar would be fine..
what rsync flag should i use to make this happend?
The following command line should achieve what you want:
$ rsync -a --progress --remove-source-files src/test/ dest
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
Totally new to Linux, have an Arch Linux machine up. What is the command I can execute on the console to download a web page in the console?
Thanks
Is wget installed?
wget http://http://stackoverflow.com/questions/9320913/how-do-you-download-a-web-page-in-arch-linux
If You want download whole page to the disc, good practice is use wget with options -k -r -p:
wget -k -r -p http://http://stackoverflow.com/questions/9320913/how-do-you-download-a-web-page-in-arch-linux
This command is downloading recursively all the files that are necessary to properly display a given html page and convert the links to make them suitable for local viewing.
try wget see http://linux.die.net/man/1/wget
wget
curl is another good option. Have fun with Linux!