[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] filsortering



On Sun, 19 Sep 1999, Niels Rasmussen wrote:

>Hej alle
>
>Når jeg nu vil flytte *.txt der er større end X byte, fra a til b hvad
>er Kommandoen så ??
>
>cd a
>mv *.txt (??) /home/migselv/b

lidt mere avanceret :) Brug find.

fra manualsiden:

-size n[bckw]
              File uses n units of space.  The units are 512-byte
              blocks by default or if `b' follows n, bytes if `c'
              follows  n,  kilobytes  if `k' follows n, or 2-byte
              words if `w' follows n.  The size  does  not  count
              indirect blocks, but it does count blocks in sparse
              files that are not actually allocated.

dvs for at finde alle filer over 10k under nuværende katalog :

find . -size +10k

hvis du vil flytte de filer du finder:

find . -size +10k -exec mv {} /path/to/whereever \;

et godt trick er at teste find med echo, og så først bagefter udføre den
rigtige kommando:

find . -size +10k -exec echo -ls -l {} \;

find er iøvrigt en af de mest nyttige kommadoer. Skimning af manualsiden
burde være lov, bare så man har en ide om havd den kan :)

/kristian

-- 
 Kristian Vilmann  - ADiCT Kalif -   sslug@sslug
 Skåne/Sjælland Linux User Group   http://www.sslug.dk
                       Now 4399 members



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:57 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *