[bglug] ReiseFS - UNDELETE is possible ?
Marco VEZZOLI
marco.vezzoli@st.com
Mer 11 Feb 2004 09:32:21 CET
Fleur wrote:
> Domanda :
> VORREI fare uno script che mi controlla tutti i file (diciamo i primi 12
> byte) e che me li rinomina automaticamente in
> nomefile.ZIP se trova "PK" all'inizio
> nomefile.SH se trova "#! /bin/bash" all'inizio
> etc ...
>
> Qualche suggerimento ?
>
> Many Thanks
>
> Fleur
>
>
prova a vedere il comando 'file' che ti puo' aiutare in uno script del
genere
pippo$ man file
FILE(1)
FILE(1)
NAME
file - determine file type
SYNOPSIS
file [ -bciknsvzL ] [ -f namefile ] [ -m magicfiles ] file
file -C [ -m magicfile ]
DESCRIPTION
This manual page documents version 3.39 of the file command.
File tests each argument in an attempt to classify it. There are
three
sets of tests, performed in this order: filesystem tests, magic
number
tests, and language tests. The first test that succeeds
causes the
file type to be printed.
The type printed will usually contain one of the words text
(the file
contains only printing characters and a few common control
characters
and is probably safe to read on an ASCII terminal),
executable (the
file contains the result of compiling a program in a form
understand-
able to some UNIX kernel or another), or data meaning
anything else
(data is usually âbinaryâ or non-printable). Exceptions are
well-known
<segue...>
:
Maggiori informazioni sulla lista
bglug