How to change directory of a file in ubuntu [closed] - linux

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 2 years ago.
Improve this question
I have python file in by ubuntu virtual machine's home directory. Is there any way I can move it to another directory instead of copying the entire code and then making a file in the directory and then pasting and saving it as a new file.

Can you use the copy (cp) command?
cp <file_to_copy> <location_to_copy_to>

That's a very silly question.
Just copy/cut the file and move it to the required directory. No need to copy the code and the creating a new file in another directory you can do this manually ( by right clicking, cut ,paste) or via terminal by just typing mv [Path of file] [The destination or cp [Path of file] [Destination]

Related

File disappeared on Ubuntu 18.04 after being renamed [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 2 years ago.
Improve this question
After finishing work on a Python file, I renamed it and it disappeared form Desktop, where it was saved. The new name starts with a dot (.).
What happened to it and how can I get it back?
If the name of a file or a directory starts with a dot, Linux considers it hidden. If your file was on the desktop, it’s most likely still there.
Open terminal and run:
cd ~/Desktop
ls -la
You should see your file on the list. Run:
mv old_filename new_filename
to rename it to something that does not start with a dot.

How to alias or rename a file on the fly in Linux? [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 2 years ago.
Improve this question
I have the following challenge under Linux:
An application is writing a config-file "samename.cfg" into certain directories
I want to have the config-file named different for each directory
I do not want any file called "samename.cfg" written to the directories
I can not change it in the application
So I would like to have the application thinking that it accesses samename.cfg but in fact it reads and writes anothername.cfg. Symlink does not help, because then there still is a file called samename.cfg in every directory.
Anybody any idea?
Regards,
Axel
Try using a hard link instead of a soft link when using ln command (just remove the -s flag).
See ln man's page for more details.

linux execute binary file by full path [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 3 years ago.
Improve this question
I have an executable file ffmpeg in /home/juping/. If I change my working directory to /home/juping/ with the command cd /home/juping/, I can run the executable file ffmpeg by running ./ffmpeg. If I do not change the working directory, can I then still run the executable file by its full path like .//home/juping/ffmpeg? I tried but it doesn't work.
You can execute it by typing
/home/juping/ffmpeg
The ./ point to current directory.

I accidentally copied a bash file replacing it with the .bashrc file in my Linux Mint. How am I supposed to retrieve the .bashrc file? [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 was trying to place my bash file to the bin, but i copied the contents to the .bashrc file, replacing the contents of the original file. I would like you to help me get back the .bashrc file.
You cannot recover your custom .bashrc. But, if you want to restore it to the default .bashrc, you will find the one copied when creating a new user in:
/etc/skel/.bashrc

linux: which is the right way to copy folder? [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 want to copy folder ajax_search, path: /home/thejobco/public_html/JCCore/ajax_search/ to be inside this foler:/home/thejobco/public_html/demo/typo3conf/ext/, should I run command this way:
cp -r /home/thejobco/public_html/JCCore/ajax_search/ /home/thejobco/public_html/demo/typo3conf/ext/
or
cp -r /home/thejobco/public_html/JCCore/ajax_search/ /home/thejobco/public_html/demo/typo3conf/ext
I am familiar with window, but not unix/linux, I put / after ajax_search, I know this way ajax_search/, shows ajax_search is a folder, but i do not know should i put / after ext or not? can anyone explain to me which is the right way to copy folder? thanks
With cp, if the destination directory already exists and you do not use a trailing slash on the source-dir, then you are actually putting a copy of source-dir inside dest-dir; this can be a problem when you forgot that the destination directory already exists.
You should include the trailing slash, to make it obvious to cp that you are trying to copy a directory name to a new directory name, and not copy the directory into an existing one, if it exists.

Resources