2018-10-12 04:30:38 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								title: Bash mv
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Bash command: mv
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-28 04:07:39 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**Rename file.**
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								mv < source >  < target > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 04:30:38 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-28 04:07:39 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**Moves files and folders.**
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 04:30:38 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2018-10-28 04:07:39 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								mv < source >  < path  +  filename > 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 04:30:38 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-13 22:58:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The first argument is the file you want to move, and the second is the location to move it to. It can also be used to rename a file, by inputting 2 file names as parameters, like so: `mv originalFilename.txt newFilename.txt` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 04:30:38 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Commonly used options:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  `-f`  to force move them and overwrite files without checking with the user. 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  `-i`  to prompt confirmation before overwriting files. 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-28 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### Warning
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								This command is capable of modifying many files at once with ease.  This can be beneficial, but also dangerous. Use at your own risk
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 04:30:38 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								### More Information:
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  [Wikipedia ](https://en.wikipedia.org/wiki/Mv )