Sponsored Content
Top Forums UNIX for Dummies Questions & Answers mv command: mv vs rename operation Post 302431941 by methyl on Wednesday 23rd of June 2010 09:01:58 AM
Old 06-23-2010
A "mv" within the same mounted filesystem just changes the name entry for that inode and is very quick. The inode number does not change and the data does not move.

A "mv" across mounted filesystem boundaries will physically copy the file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to rename multiple files with a single command

Hi I have following list of files at a path: 01.AR.asset 01.AR.index 01.AR.asset.vf 01.AR.asset.xv I want to rename all these files as follows: 73.AR.asset.Z 73.AR.index.Z 73.AR.asset.vf.Z 73.AR.asset.xv.Z Can any body give me a single command to acheive the above results. ... (5 Replies)
Discussion started by: tayyabq8
5 Replies

2. Shell Programming and Scripting

how to rename all the files with one command?

How do i rename all the files using a script ? My server create log files and save them with numbering behind the name. for e.g. daily_20080101.log.0001 and so on ... How do a script and crontab it to remove all the numbering? Please help thanks. (2 Replies)
Discussion started by: filthymonk
2 Replies

3. Shell Programming and Scripting

sed command for substring operation

Hi All, Input=abcDEF_1.6k1 I need to use ‘sed' command to get 1.6 value and store to some variable from the given input. Please help me in getting the command. Regards, Kalai (2 Replies)
Discussion started by: kalpeer
2 Replies

4. Shell Programming and Scripting

Rename file using sed command

Greetings, I am very new to the UNIX shell scripting and would like to learn. However, I am currently stuck on how to process the below sample : Filename : DOCabcdef24387987ab90d.xml Pattern "DOC"+any character using and +".xml" And i want to change the second part of that file (any... (20 Replies)
Discussion started by: fanny_tirtasari
20 Replies

5. Shell Programming and Scripting

Column operation : cosne and sine operation

I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file . file.txt 900.00000 1 1 1 500.00000 500.00000 100000.000 4 4 1.45257346E-07 899.10834 ... (4 Replies)
Discussion started by: shashi792
4 Replies

6. Shell Programming and Scripting

ksh command to rename all files with no extension

hi! i want to rename all files with no extension with the extension DAT. with this command ls |grep -v "\\." i can list files but i dont know how i am going to rename them.. so i tried FILE_LIST=ls |grep -v "\\." for TEST_FILE in ${FILE_LIST} do mv $TEST_FILE... (2 Replies)
Discussion started by: kouppoua
2 Replies

7. Shell Programming and Scripting

sed command to skip the first line during find and replace operation

Hi Gurus, I did an exhaustive search for finding the script using "sed" to exclude the first line of file during find and replace. The first line in my file is the header names. Thanks for your help.. (4 Replies)
Discussion started by: ks_reddy
4 Replies

8. Shell Programming and Scripting

Having trouble with find rename jpg command

Hi, I have a large series of directories and subdirectories with many jpgs in them. I need to do two things: 1. Create a copy of each jpg found within it's own subdirectory 2. Rename this copied jpg such that apple.jpg becomes apple_m.jpg I have tried to run the following commands in... (1 Reply)
Discussion started by: atharvan13
1 Replies

9. UNIX for Beginners Questions & Answers

Move and Rename in One Command

Hey all, I really need help with some homework I'm having on UNIX. This probably sounds stupid, but I'm being asked to move a file to a specific directory and rename it a specified name in one command. I know how to do it in more than one command, I just can't seem to figure it out using only one... (1 Reply)
Discussion started by: ayylmao12
1 Replies

10. UNIX for Dummies Questions & Answers

FTP rename command help

I have to ftp and rename the file with #finished# extension after successfully transfer. In some environments the command rename ABCD.dat ABCD.#finished# is working fine, but some environments its not working, I have to use escape character something like : rename ABCD.dat ABCD.\#finished\# Why is... (3 Replies)
Discussion started by: srikanth38
3 Replies
GIT-MV(1)							    Git Manual								 GIT-MV(1)

NAME
git-mv - Move or rename a file, a directory, or a symlink SYNOPSIS
git mv <options>... <args>... DESCRIPTION
Move or rename a file, directory or symlink. git mv [-v] [-f] [-n] [-k] <source> <destination> git mv [-v] [-f] [-n] [-k] <source> ... <destination directory> In the first form, it renames <source>, which must exist and be either a file, symlink or directory, to <destination>. In the second form, the last argument has to be an existing directory; the given sources will be moved into this directory. The index is updated after successful completion, but the change must still be committed. OPTIONS
-f, --force Force renaming or moving of a file even if the target exists -k Skip move or rename actions which would lead to an error condition. An error happens when a source is neither existing nor controlled by Git, or when it would overwrite an existing file unless -f is given. -n, --dry-run Do nothing; only show what would happen -v, --verbose Report the names of files as they are moved. SUBMODULES
Moving a submodule using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will update the gitfile and core.worktree setting to make the submodule work in the new location. It also will attempt to update the submodule.<name>.path setting in the gitmodules(5) file and stage that file (unless -n is used). GIT
Part of the git(1) suite Git 1.8.5.3 01/14/2014 GIT-MV(1)
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy