mvdir(1M) System Administration Commands mvdir(1M)NAME
mvdir - move a directory
SYNOPSIS
/usr/sbin/mvdir dirname name
DESCRIPTION
mvdir moves directories within a file system. dirname must be a directory. If name does not exist, it will be created as a directory. If
name does exist, and is a directory, dirname will be created as name/dirname. dirname and name may not be on the same path; that is, one
may not be subordinate to the other. For example:
example% mvdir x/y x/z
is legal, but
example% mvdir x/y x/y/z
is not.
OPERANDS
dirname The name of the directory that is to be moved to another directory in the filesystem.
name The name of the directory into which dirname is to be moved. If name does not exist, it will be created. It may not be on the
same path as dirname.
USAGE
See largefile(5) for the description of the behavior of mvdir when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
EXIT STATUS
0 Successful operation.
>0 Operation failed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO mkdir(1), mv(1), attributes(5), largefile(5)SunOS 5.11 14 Mar 1997 mvdir(1M)
Check Out this Related Man Page
mvdir(1M) System Administration Commands mvdir(1M)NAME
mvdir - move a directory
SYNOPSIS
/usr/sbin/mvdir dirname name
DESCRIPTION
mvdir moves directories within a file system. dirname must be a directory. If name does not exist, it will be created as a directory. If
name does exist, and is a directory, dirname will be created as name/dirname. dirname and name may not be on the same path; that is, one
may not be subordinate to the other. For example:
example% mvdir x/y x/z
is legal, but
example% mvdir x/y x/y/z
is not.
OPERANDS
dirname The name of the directory that is to be moved to another directory in the filesystem.
name The name of the directory into which dirname is to be moved. If name does not exist, it will be created. It may not be on
the same path as dirname.
USAGE
See largefile(5) for the description of the behavior of mvdir when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
EXIT STATUS
0 Successful operation.
>0 Operation failed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO mkdir(1), mv(1), attributes(5), largefile(5)SunOS 5.10 14 Mar 1997 mvdir(1M)
Hi,
I've a problem with display "*" character:
I'd like to use a script which take a complete path of set of files or directories in argument and separate them into their "dirname" part and their "basename" part.
It works nearly exept that if i want to display the result (dirname +... (5 Replies)
echo dirname/filename* | xargs ls -t
As a substitute doesn't give the results desired when I exceed the buffer size. I still want the files listed in chronological order, unfortunately xargs releases the names piecemeal...does anyone have any ideas? :( (4 Replies)
I have a couple thousand data files that all have to have there own directory named exactly the same as the file name. Then the file needs to be moved to that directory. For example files test1.mat, test2.mat, test3.mat in directory X need to have directories test1, test2, test3 created... (6 Replies)
I want to move a file (either pdf,xls,csv) from one path to a specified location. once the file moved to that location a need a text file as return receipt to the first path(from where it moved).:confused:
either in shell or perl scipt...
Advance Thanks...
Prabhu (5 Replies)
I have the below script to check whether directory is exist or not , now I sure the directory /abc NOT exist , but when run the script , it still pop the result is "the directory exist" , could suggest what is wrong ? thx
ll -d /abc > /dev/null 2>&1
if
then
echo "the directory exist !!"
... (7 Replies)
Actually i want to copy some file locations to another. so if directory not exist it should create that.
i used cp -R/r but it copies only one directory. it doesnt make directory inside directory..
so i want this should create them automatically.
One more thing if file already exist there... (8 Replies)
Hi,
I am trying to get the total file size for certain files per directory.
I am using
find /DirectoryPath -name '*.dta' -exec ls -l {} \; | awk '{ print $NF ": " $5 }' > /users/cergun/My\ Documents/dtafiles.txt
but this lists all the files in the directories.
I need the total... (9 Replies)
Hi,
I'm trying to improve my Unix skills and I'm wondering what is the best way to move some files based on filetype and attributes like time created?
For instance, lets suppose I have a directory with many different files in it and I'd like to move all the jpgs that were created between May... (6 Replies)
I'm running AIX unix korn shell. If I echo $0, I only get the filename, it does not have the directory name also. So when I do: `dirname $0` it returns a . (meaning current directory). How get $0 to return the full path/filename? Do I need something in my .profile? Thank you. (8 Replies)
-w "filename"
is suppose to return 0 if the file got write permission and 1 if not right?
for some reason... when i test it, it keep returning 1 even after i set full 777 permission to that file/directory?
the directory will become /path/path2/path3
directory = `dirname... (9 Replies)
Hi All
Any one please suggest me...
I have one directory every monday one file will be created in that directory. so if the file is created on monday or not i need check first.
How can write a script??? if the file is not created i want to quit from script.
Thanks
K.Srinivas (5 Replies)
Hello,
i want to script on sh to check from a path if the directory exist and isn't empty.
I explain:
path is : /aaa/bbb/ccc/ccc_name/ddd/
Where the cccc_name is in a list, so i think it's $1
My command
find -name /aaa/bbb/ccc/$1/ddd/ didn't work because my $1 is the same and not... (5 Replies)
Hello so I've stored some csv data to be read into variables like this
Name,Team,Shop,Shoe
etc,etc,etc,etc
Code:
sep=","
{
while IFS=$sep read Name Team Shop Shoe
do
count=1
dirname=$Name
while
do
((count++))
dirname="${Name}$count" (4 Replies)