Linux mv command move all files to sub folder [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 last year.
Improve this question
I want to move all folders from within a folder named public to it's parent folder.
public\public\200 folders
I have tried mv public ~/site/storage/app/public but get the error Directory not empty.
What am I missing? Thanks I'm new to Linux.

Try mv public/* ~/site/storage/app/public! The * selects all the files inside the public directory.

Related

How do I remove a directory with the name of '--' [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 1 year ago.
Improve this question
A badly-written script created a directory named '--' (including the single quotes) in my home directory.
When I cd to that directory, I am brought back to my home directory.
I'd like to remove that item, but cannot figure out how to do it. Escaping some or all of the characters in the directory name, returns No such file or directory.
rmdir \'--\' should do the trick
simply type the following:
rm -rf \'--

how to rename files and thank you [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
how I can rename several files (Q0138-9061933666_S5.fasta.db) in a folder and leave only the no as ca (Q0138-9061933666_S5.db) i.e. delete .fasta from all files
Assuming you are in the folder where the files are placed.
for i in *.fasta.db
do
mv $i ${i/\.fasta/} # remove "fasta" from file name
done
See Replace one substring for another string in shell script for details about string substitution

How can i symlink home directory 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 6 years ago.
Improve this question
I have my home directory in /home/tom.
In another partition I have a folder called /data/tomhome.
Basically, I copy all of my data from /data/tomhome to /home/tom
But whenever I update files in /data/tomhome, I still have to copy them to the other directory.
Another way will be to symlink all files but i don't want to make 20 symlinks.
Is there any other way for this?
Try
ln -s /home/tom /data/tomhome
Note: You should delete the directory /data/tomhome with rm -rf /data/tomhome if it exists already

In Linux, zip multiple directories in one named zip 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 6 years ago.
Improve this question
I have the following directories, I want to zip up into the same zip file. Can someone provide the correct syntax?
ie. zipping the following directories:
/home/users/jlefler/files
/opt/software/reports/files
into a zip file called backup.zip.
try
zip -r backup.zip /home/users/jlefler/files /opt/software/reports/files
you can add more directories at the end of the command

In Linux, how to unlink a softlink from the actual file if both have same names [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 have a softlink mistakenly created as this:
/backup_rmbeir1 -> /backup_rmbeir1
I want to delete the soft link now. If I do :
rm /backup_rmbeir1
will this delete the link, or the actual file ? If not what will be the best way to achieve this ? I tried the unlink command but didn't help.
The soft link is /backup/backup_rmbeir1, so delete that by rm /backup/backup_rmbeir1.

Resources