How to Move (or 'Cut and Paste') a File in Linux

(0 votes, average 0 out of 5)

Moving a file in linux is as easy as using the mv command:

mv filename.txt foo/bar/newname.txt

The command above would move a file named filename.txt into the bar directory with a new name (newname.txt). If you only specify the directory, the name of the file will not change.

Partner Links:
 
Related Articles

» How to Undo a File Move, Copy, or Delete with a Hotkey

As long as you have not permanently deleted a file by emptying the recycling bin or deleting the file with shift + delete, you can easily undo a file move, copy, or deletion using the control + z hotkey.

» How to Grep Output of a Program in a Linux Terminal

Grepping the output of a script or program in a linux terminal is very straightforward.  Run the script or program and pipe the output to grep, leaving the file designation empty.myprog -h | grep "Usage"The vertical bar indicates a piped output to a different program -- in this case, grep.  The example above will return all lines which contain the substring "Usage".

» Combine MP4/M4V Files in Linux/Ubuntu

You may want to combine multiple mp4/m4v video files into one continuous video. In order to do this, you need to install the gpac library of programs onto Ubuntu. Open up Terminal and run:sudo apt-get install gpac This will install the gpac library. One of the programs included with it is MP4Box, which you can use to concatenate the video files. If you are using 64 bit Linux or get an error like MP4Box: error while loading shared libraries: libgpac.so: cannot open shared object file: No such...