Você não está autenticado.
O fórum foi atualizado e está usando dois níveis de "autenticação" no registro de novos usuários para evitar o cadastro de bots, por favor, qualquer problema entrar em contato pelo e-mail forum@archlinux-br.org.
Por favor, leia as regras do fórum antes de usá-lo.
Páginas: 1
Olá galera, firmeza, sim tudo ótimo.
O único comando que conheço para listar os discos é o cfdisk. Mas ele não reproduz uma saída para que possa escrever em um arquivo ou em um log.
Pode até ser que o parted faça mas mesmo assim eu não consegui ler os labels com o parted.
Teria alguma forma tipo:
fdisk -l | tee disk.logOffline
Oi amigo
Mais informações
https://wiki.archlinux.org/index.php/Pe … ice_naming
Você pode usar os comandos ls , blkid.....
Execute como root
[ Lista tudo ]
$ blkid -o list -c /dev/null
device fs_type label mount point UUID
------------------------------------------------------------------------------------------
/dev/sda1 ext2 /boot 7f4cef7e-7ee2-489a-b759-d52ba23b692c
/dev/sda2 swap (not mounted) a807fff3-e89f-46d0-ab17-9b7ad3efa7b5
/dev/sda3 ext4 / 81917291-fd1a-4ffe-b95f-61c05cfba76f
/dev/sda4 ext4 /home c4c23598-19fb-4562-892b-6fb18a09c7d3
/dev/sdb1 ext4 X2 /mnt/X1 4bf265f7-da17-4575-8758-acd40885617b
/dev/sdc1 ext4 X1 /mnt/X2 4bf265f7-da17-4575-8758-acd40885617b
/dev/sdd1 ext4 Y2 /mnt/Y2 8a976a06-3e56-476f-b73a-ea3cad41d915
/dev/sde1 ext4 Z2 /mnt/Z2 9d35eaae-983f-4eba-abc9-434ecd4da09c
/dev/sdf1 ext4 Y1 /mnt/Y1 e2ec37a9-0689-46a8-a07b-0609ce2b7ea2
/dev/sdg1 ext4 Z1 /mnt/Z1 9fa239c1-720f-42e0-8aed-39cf53a743ed
/dev/sdj1 ext4 RAPT (not mounted) a9ed7ecb-96ce-40fe-92fa-e07a532ed157
/dev/sdj2 swap <swap> 20826c74-eb6d-46f8-84d8-69b933a4bf3fOs formatos da opção -o e o -c ( man blkid )
-c cachefile
Read from cachefile instead of reading from the default cache
file (see CONFIGURATION FILE section for more details). If you
want to start with a clean cache (i.e. don't report devices pre‐
viously scanned but not necessarily available at this time),
specify /dev/null.
-o format
Display blkid's output using the specified format. Note that the
variables order and devices order is variable. See also -s. The
format parameter may be:
full print all tags (the default)
value print the value of the tags
list print the devices in a user-friendly format; this output
format is unsupported for low-level probing (-p or -i)
device print the device name only; this output format is always
enabled for -L and -U options
udev print key="value" pairs for easy import into the udev
environment; the keys are prefixed by ID_FS_ or ID_PART_
prefixes
The udev output returns the ID_FS_AMBIVALENT tag if more
superblocks are detected, and ID_PART_ENTRY_* tags are
always returned for all partitions including empty parti‐
tions.
export print key=value pairs for easy import into the environ‐
ment; this output format is automatically enabled when
I/O Limits (-i option) are requestedExecute como usuário comum
[ Por Label ] - Para listar somente a label : ls /dev/disk/by-label
$ ls -lF /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 10 Oct 16 10:27 data -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 data2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 fat -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct 16 10:27 home -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 16 10:27 root -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 16 10:27 swap -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 16 10:27 windows -> ../../sdb1Execute como usuário comum
[ Por uuid ] - Para listar somente o uuid : ls /dev/disk/by-uuid/
$ ls -lF /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Oct 16 10:27 2d781b26-0285-421a-b9d0-d4a0d3b55680 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 16 10:27 31f8eb0d-612b-4805-835e-0e6d8b8c5591 -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 16 10:27 3FC2-3DDB -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct 16 10:27 5090093f-e023-4a93-b2b6-8a9568dd23dc -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 912c7844-5430-4eea-b55c-e23f8959a8ee -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 16 10:27 B0DC1977DC193954 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct 16 10:27 bae98338-ec29-4beb-aacf-107e44599b2e -> ../../sdb2man ls
-F, --classify
append indicator (one of */=>@|) to entries
-l use a long listing formatEm vez de usar o comando tee. Você pode usar o operador > ou >> ( redirecionar )
> cria se não existir o arquivo e sempre sobrescreve o arquivo
>>cria se não existir o arquivo ou adiciona a informação no fim do arquivo
blkid -o list -c /dev/null > info.log
Se quiser os dois comandos do ls
ex. Para pasta Info
ls -lF /dev/disk/by-label > ~/Info/info.log && ls -lF /dev/disk/by-uuid/ >> ~/Info/info.log
Última edição por swatquest (20/04/2012 18:01:53)
Offline
Massa swatquest, realmente não conhecia esse comando, mesmo porque não uso uuid, mas ficou perfeito, excelente
Valeu Cara !
Offline
Páginas: 1