Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to transfer the folder from a CD to Documents in Ubuntu. How should i code it in shell? the folder name in the cd is CompFiles.

share|improve this question

marked as duplicate by bodhi.zazen, mikewhatever, Raja, Eliah Kagan, Nathan Osman Mar 13 '13 at 5:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 1 down vote accepted

Your CD should be mounted in /media/$USER/ directory, so the source directory becomes /media/$USER/label_on_CD/CompFiles/ and your destination directory is /home/$USER/Documents/. To copy the files, either execute the command:

cp /media/$USER/label_on_CD/CompFiles/ /home/$USER/Documents/ -r

or write this command to a file and execute the command bash file_name where file_name is the name of the script.

share|improve this answer
    
how should i save this script? file_name.sh? –  Kayla Mar 13 '13 at 3:05
    
You can save it without .sh too. Bash interprets the file as a shell script even without it. –  i08in Mar 13 '13 at 3:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.