02-20-2003
moving a file?
i'm trying to move a file from one diectory to another and rename it at the same time. but its giving me an error .
" mv: cannot unlink /dir2/file5 : No such file or directory"
here is the command I'm using.
mv /dir1/file1 /dir2/file5
solaris 8
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Happy 2002.
Now I am actually encountering a problem.
Suppose I have a file which I can see has been named as -rw-rwx or .rwxrw-- .
when I try to move this file I am unable to do so.
Can someone please help me , How can i get rid of the file.
Thanks in advance .
:confused: (3 Replies)
Discussion started by: rooh
3 Replies
2. Shell Programming and Scripting
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies
3. UNIX for Dummies Questions & Answers
i have created file in one of the folders on unix
UNIX 's36tou -T XYZ /tmp/p400/dataout/ias/AB >/dev/null
I am using above command to copy file from one system to unix
XYZ is name of file on my system usually this name is very big so i use -T to trim some charaters from name.
noe... (1 Reply)
Discussion started by: ajit.yadav83
1 Replies
4. Shell Programming and Scripting
Hi ,
Please help with the following questions
1) how can i find size of a file ? i have written du -k $flname > s1 . Is this right ?
Any other better suggeastions ?
2) how do I use mv command for moving the file ? I need the syntax with some examples
3) Command for printing the total... (1 Reply)
Discussion started by: Learning!
1 Replies
5. Shell Programming and Scripting
Hello ALL, i hope everyone is fine here.
I have found some directories that have 777 permission with below command.
find ./ -type d -perm 0777
e/uploads/
e/uploads/s1
j/uploads/
j/uploads/s1
I want that if there is any php|html|css file found in above directory so move those... (4 Replies)
Discussion started by: learnbash
4 Replies
6. UNIX for Dummies Questions & Answers
Suppose there is a file Text1.txt which contains 100 lines. I need to move 1st 25 line into another file Text2.txt How we can do it?
Suppose there is a file Text1.txt in which city: Bangalore is repeating N times. I need to replace Bangalore with Delhi. How we can do... (1 Reply)
Discussion started by: Rajesh1412
1 Replies
7. UNIX for Advanced & Expert Users
Need help on moving .csv file from unix to windows file path. (1 Reply)
Discussion started by: lakshmanraok117
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Before moving the files from source directory to target directory I need to check if the files have these strings 'Error', 'Not Valid' ,' YTF-' or if the file is a zero byte file, if the file contains these strings or if it is a zero byte file i should log a entry in the log file and fail... (5 Replies)
Discussion started by: gaur.deepti
5 Replies
9. UNIX for Dummies Questions & Answers
Hello,
This is my first post, so please forgive my obvious lack of UNIX knowledge. I am trying/needing to write a script that follows this functional flow:
1. Access a config file that contains format:<directory> <filetype> <daterange>
<directory> <filetype> <daterange>
<directory>... (2 Replies)
Discussion started by: WildBeard83
2 Replies
10. Programming
Hi,
I've done a set of operations on some text files using a someexecutuble.jar file, which is internally calling some python scripts. Post that, in same location, my jar created some log files.
However, i'm not able to re-direct the log files to some other location in my windows directory.... (1 Reply)
Discussion started by: arjun_arippa
1 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
This script is used to move or rename a file, directory or symlink.
git mv [-f] [-n] <source> <destination>
git mv [-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
AUTHOR
Written by Linus Torvalds <torvalds@osdl.org[1]> Rewritten by Ryan Anderson <ryan@michonline.com[2]> Move functionality added by Josef
Weidendorfer <Josef.Weidendorfer@gmx.de[3]>
DOCUMENTATION
Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org[4]>.
GIT
Part of the git(1) suite
NOTES
1. torvalds@osdl.org
mailto:torvalds@osdl.org
2. ryan@michonline.com
mailto:ryan@michonline.com
3. Josef.Weidendorfer@gmx.de
mailto:Josef.Weidendorfer@gmx.de
4. git@vger.kernel.org
mailto:git@vger.kernel.org
Git 1.7.1 07/05/2010 GIT-MV(1)