Moved all home directories to different folder? [closed] - shell

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 6 years ago.
Improve this question
Ok this is embarrassing!! I wanted to move remote folder from downloads on to /var/www/html directory !! So I used the following command with sudo
mv /Downloads/remote /var/www/html/remote
And messed up entire file system !! All my home folders which includes downloads, folders and data on desktop everything is moved in /var/www/html/remote and no application or files seems to open !! The only thing that opens is the terminal !! How can I fix this please help !!

First thing to try to reverse it:
sudo mv /var/www/html/remote/<your_user_name> /home/
Otherwise if <your_user_name> isn't in /var/www/html/remote/, do a:
sudo cp -rp /var/www/html/remote/<your_user_name>/* /home/<your_user_name>/
then remove manually what shouldn't be in directory remote and what shouldn't be in directory /home/<your_user_name>/...

Related

Ubuntu terminal removing multiple partial files using wildcard [closed]

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 12 months ago.
Improve this question
This maybe easy on linux users, but I am having a hard time figuring out how to delete multiple files (partial files) using wildcard.
sudo rm logs/archived/remove_me.2022.* or sudo rm logs/archived/remove_me.2022.? seems not to work.
I am getting the error rm: cannot remove 'logs/archived/remove_me.*': No such file or directory
I am currently on /var/lib/tomcat8/ trying to remove these logs inside logs/archived.
I am remove them one by one but there are a lot of files to remove .. (example. from 2020 and there are daily and in partial files).
Example I am inside /var/lib/tomcat8/logs/archived/ and I want to remove all log files starting with remove_me.2021.*
Below are the sample list of files that I want to remove.There are also other files in this directory that should not be removed.
remove_me.2022-03-02.1.log.gz
remove_me.2022-03-02.2.log.gz
remove_me.2022-03-02.3.log.gz
remove_me.2022-03-02.4.log.gz
remove_me.2022-03-02.5.log.gz
remove_me.2022-03-03.1.log
remove_me.2022-03-03.2.log
remove_me.2022-03-03.3.log
remove_me.2022-03-03.4.log
remove_me.2022-03-03.5.log
remove_me.2022-03-03.6.log
remove_me.2022-03-03.7.log
remove_me.2022-03-03.8.log
remove_me.2022-03-03.9.log
remove_me.2022-03-03.10.log
I believe the issue here is that the asterisk (*) is resolved by the current user, i.e., before becoming the superuser. Hence, it resolves to nothing, because the current user is not able to even read that directory.
Solve this by becoming superuser first, and then doing everything normally:
sudo -i
cd /var/lib/tomcat8/logs/archived/
rm remove_me.2022.*

Why I can`t go to the desktop in terminal (babun) [closed]

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 cant go to my desktop using cd command.
There is
no such file or directory
error.
What am I doing wrong?
Try using an absolute path like cd /user/home/*YOUR_USERNAME*/Desktop please be advised that Unix bash is case sensitive.
If this don't work you can still run the ls - all command in your home directory to see all folders and files inside.
If you see the "Desktop" folder and just can't change into the directory try using sudo cd ~/Desktop
Hope that helps.

Syncing dot files with dropbox [closed]

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 9 years ago.
Improve this question
I puts all my dotfiles in $HOME/Dropbox/dotfiles
and make a hard link(I think it's the way to go, and for instance vim does't load soft link rc file)
ln $HOME/Dropbox/dotfiles/.vimrc $HOME/.vimrc
The problem is as long as I make change to the file in the dropbox directories, everything works as expected. But when I change the hard link file(which is $HOME/.vimrc), the original file changes accordingly, but dropbox won't sync!!(same as iCloud mobile document folder)
Any idea?
Use soft links. Hard links make it so that Dropbox can't tell when the file is updated. This is because Dropbox doesn't poll the contents of every single file you have, it just looks at modification dates on the files located in your Dropbox.
This is exactly what I use for syncing my dot files with Dropbox:
$ ln -s ~/Dropbox/dotfiles/.vimrc .vimrc
and vim still loads the soft-linked vimrc file.

MacVim not downloading ./vim file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
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.
Improve this question
Im trying to download plugins for my macVim but there is no ./Vim folder? when I download macvim all I get is the application file which works.....am I downloading it from the wrong place?
In Terminal.app, run the following commands to create the ~/.vim directory and the ~/.vimrc file.
$ cd
$ touch .vimrc
$ mkdir .vim
$ open .vim
~/.vim (case sensitive!) you mean? If it dose not exist, just create it.

cp: cannot stat `/vol/examples/tutorial/science.txt': No such file or directory [closed]

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
I tried a command cp /vol/examples/tutorial/science.txt . and I get the error -
cp: cannot stat `/vol/examples/tutorial/science.txt': No such file or directory
I don't understand why this is happening. I went to cygwin home folder and created the necessary folder structure and text file. I also checked the folder structure and names. So, why is it not working ?
You said you
went to cygwin home folder and created the necessary folder structure and text file
So the file you are trying to copy is not located in /vol/examples/tutorial/ but in ~/vol/examples/tutorial/. ~ is an abbrevation for your cygwin home directory, usually /home/<username>.
You should be able to copy the file as user000001 says: cp ~/vol/examples/tutorial/science.txt .

Resources