Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    esercizio comandi shell

    Chi mi aiuta:

    Trovare il file più grande in /lib
    Hints: usare du, sort e tail

  2. #2

  3. #3

  4. #4
    Utente di HTML.it L'avatar di patel
    Registrato dal
    Jan 2008
    Messaggi
    1,994
    Originariamente inviato da Z0rn
    hint: utilizzare le celluline grige?
    codice:
    man comando
    ed hai l'help

  5. #5
    si poi posso cercare so google...

    Ma visto che non ho trovato niente qualcuno ha volgia di aiutarmi?

    ls -lR /lib | grep -e '^-' | sort -k 5 -n | tail -n 1 | cut -d' ' -f8


    Così lo trovo, ma non uso du.
    c'è un modo in du per ottenere solo i fiel e non le directory?

  6. #6
    Utente di HTML.it L'avatar di patel
    Registrato dal
    Jan 2008
    Messaggi
    1,994
    una cosa del genere ti va bene ?
    du -h / | grep '[[:digit:]]G\b'

    cerca anche su http://forum.ubuntu-it.org/index.php...,249770.0.html

  7. #7
    bello, ma continua a ritornarmi anche le cartelle.

    su du c'è modo di escluderle?

  8. #8
    Utente di HTML.it
    Registrato dal
    Jun 2007
    Messaggi
    225
    codice:
    DU(P)                      POSIX Programmer?s Manual                     DU(P)
    
    NAME
           du - estimate file space usage
    
    SYNOPSIS
           du [-a | -s][-kx][-H | -L][file ...]
    
    DESCRIPTION
           By  default,  the  du  utility shall write to standard output the size of the file space allocated to, and the size of the file space
           allocated to each subdirectory of, the file hierarchy rooted in each of the specified files. By default,  when  a  symbolic  link  is
           encountered  on  the command line or in the file hierarchy, du shall count the size of the symbolic link (rather than the file refer-
           enced by the link), and shall not follow the link to another portion of the file hierarchy. The size of the file space allocated to a
           file  of  type directory shall be defined as the sum total of space allocated to all files in the file hierarchy rooted in the direc-
           tory plus the space allocated to the directory itself.
    
           When du cannot stat() files or stat() or read directories, it shall report an error condition and the final exit status is  affected.
           Files  with  multiple  links  shall  be counted and written for only one entry. The directory entry that is selected in the report is
           unspecified. By default, file sizes shall be written in 512-byte units, rounded up to the next 512-byte unit.
    
    OPTIONS
           The du utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
    
           The following options shall be supported:
    
           -a     In addition to the default output, report the size of each file not of type directory in the  file  hierarchy  rooted  in  the
                  specified file. Regardless of the presence of the -a option, non-directories given as file operands shall always be listed.
    
           -H     If  a  symbolic link is specified on the command line, du shall count the size of the file or file hierarchy referenced by the
                  link.
    
           -k     Write the files sizes in units of 1024 bytes, rather than the default 512-byte units.
    
           -L     If a symbolic link is specified on the command line or encountered during the traversal of a file hierarchy,  du  shall  count
                  the size of the file or file hierarchy referenced by the link.
    
           -s     Instead of the default output, report only the total sum for each of the specified files.
    
           -x     When evaluating file sizes, evaluate only those files that have the same device as the file specified by the file operand.
    
           Specifying  more  than  one  of  the mutually-exclusive options -H and -L shall not be considered an error. The last option specified
           shall determine the behavior of the utility.
    .
    .
    .

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.