Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the command for cut copy paste a file from one directory to other directory [closed]

Tags:

Can any one please help what is the command for cut copy and paste one file from one directory to other directory. I want do above task by using Command from command prompt.

I know I can do this by using mouse but I am learning command prompt that's why I want to know.

like image 202
mayur rahatekar Avatar asked Jan 13 '12 04:01

mayur rahatekar


People also ask

What is the command to copy from one directory to another directory?

The cp command also copies entire directories into other directories if you specify the -r or -R flags. You can also copy special-device files using the -R flag.

How do I copy a file from one directory to another in command prompt?

Highlight the files you want to copy. Press the keyboard shortcut Command + C . Move to the location you want to move the files and press Command + V to copy the files.

How do I cut a file from one directory to another in Linux?

The syntax is simple, too. Use cp followed by the file you want to copy and the destination where you want it moved. That, of course, assumes that your file is in the same directory you're working out of. You can specify both.

How do I copy and paste from one directory to another in Linux?

In order to copy a directory on Linux, you have to execute the “cp” command with the “-R” option for recursive and specify the source and destination directories to be copied.


2 Answers

mv in unix-ish systems, move in dos/windows.

e.g.

C:\> move c:\users\you\somefile.txt   c:\temp\newlocation.txt 

and

$ mv /home/you/somefile.txt /tmp/newlocation.txt 
like image 94
Marc B Avatar answered Sep 22 '22 14:09

Marc B


use the xclip which is command line interface to X selections

install

apt-get install xclip 

usage

echo "test xclip " > /tmp/test.xclip xclip -i < /tmp/test.xclip xclip -o > /tmp/test.xclip.out  cat /tmp/test.xclip.out   # "test xclip" 

enjoy.

like image 35
jiahut Avatar answered Sep 21 '22 14:09

jiahut