The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
listing files in a directory in bases of size arunkumar_mca UNIX for Dummies Questions & Answers 1 02-13-2008 07:38 AM
Find files size 0 within a directory astonmartin Shell Programming and Scripting 3 02-07-2008 04:49 PM
files of size 0 need to be deleted inside a directory namishtiwari Shell Programming and Scripting 2 01-28-2008 04:11 AM
bash script working for small size files but not for big size files. davidpreml Shell Programming and Scripting 1 11-01-2006 11:06 AM
How to check if 3 files have same size in directory oggle Shell Programming and Scripting 5 02-16-2005 12:51 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-14-2008
skcontact skcontact is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 9
Cp files (>5 Mb size) from one directory to another

Hi All,
I have a requirement like below,
I want to transfer few file of size > 5 Mb from one directory to anotehr directory. Please let me know the command how can i do that

Sorry if it looks silly

Senthil
  #2 (permalink)  
Old 05-14-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
Quote:
Sorry if it looks silly
Why do you think this?
  #3 (permalink)  
Old 05-14-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
The mv command should be fairly agnostic to the sizes of the files. If you are moving from one file system (mount point) to another and the destination has issues with large files, you might get weird error messages, but that would be like when you are talking gigabytes.
  #4 (permalink)  
Old 05-14-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,930
are those files in the same filesystem ? across NFS ?

did you consider using " mv " instead of copying and deleting ?
  #5 (permalink)  
Old 05-14-2008
skcontact skcontact is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 9
yes. they are in same file system..
please let me know how can i use mv command so that all files with > 5Mb size automatically to new directory.
also there are lot many files
  #6 (permalink)  
Old 05-14-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
There are various variants of the find command, but see if the following finds the files you want for a start.

Code:
find path/to/directory -type f -size +5000
These forums are full of examples of how to use find; search for find mv for some good examples.
  #7 (permalink)  
Old 06-12-2008
yasin yasin is offline
Registered User
  
 

Join Date: Apr 2008
Location: lebanon
Posts: 5
copying files

Hi,


If the files in the same directory you can use one of these comands:


go to the path where is the file is located by cd comand


then do
cp [the path] [the file name [the pathe where you want to keep][the file name]
you can also use mv in the same way
If the files are in different filesystems you have to use:
FTP comand

good luck
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:45 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0