- Linux
- OpenBSD
- FreeBSD
- Solaris
- bash/shell
- » ab
- » arp
- » arping
- » awk
- » bzip2, bunzip2, bzip2re...
- » chcase
- » chkconfig
- » chmod
- » chown
- » comm
- » convert
- » cat
- » cp
- » cpio
- » cryptsetup
- » curl
- » date
- » diff
- » dig
- » dumpe2fs
- » e2fsck(fsck.{ext2,ext3})
- » eval
- » exportfs
- » file
- » find
- » ftp
- » fuser
- » getfacl
- » grep, egrep, fgrep
- » grub
- » gzip, gunzip
- » hdparm
- » head
- » host
- » ifconfig
- » ifenslave
- » import
- » ionice
- » ip
- » ipcs, ipcrm
- » kill
- » ldconfig
- » ld
- » ldd
- » less
- » locale
- » locate
- » losetup
- » ls
- » lsmod
- » lsof
- » man
- » mke2fs(mkfs.{ext2,ext3})
- » mkinitrd
- » mknod
- » mkswap
- » modinfo
- » modprobe
- » mount
- » mtr
- » mv
- » mysql
- » mysqladmin
- » mysqldump
- » netstat
- » netstat-nat
- » nice
- » nc
- » nm
- » nslookup
- » objdump
- » openssl
- » parted
- » patch
- » perl
- » pg_dump
- » pidof
- » ping
- » pkg-config
- » ps
- » psql
- » rar
- » readelf
- » renice
- » rm
- » rmmod
- » route
- » rpcinfo
- » rpm
- » rsync
- » screen
- » sed
- » sendmail
- » seq
- » setfacl
- » sfdisk
- » showmount
- » shred
- » smartctl
- » smbclient
- » smbget
- » smbpasswd
- » socat
- » sort
- » sox
- » split
- » ssh
- » ssh-keygen
- » stat
- » stdbuf
- » strace
- » svn, svnadmin
- » systool
- » tail
- » tar
- » tcpdump
- » top
- » tr
- » tracepath
- » traceroute
- » tune2fs
- » udevcontrol, udevadm
- » unclutter
- » uniq
- » unzip
- » uuencode, uudecode
- » vim
- » vncviewer
- » vnstat
- » wc
- » wget
- » wput
- » xargs
- » xhost
- » xprop
- » xrandr
- » xwd
- » xxd
- » yum
- » zip, zip{cloak,note,split}
- KDE
- GTK
CONTENT
- CHANGES
Szukaj
#top stat¶
stat - display file or file system status
Powiązane:
ls, stat,
SYNOPSIS
stat [OPTION] FILE...
DESCRIPTION
OPTIONS
Display file or file system status.
-L, --dereference
-Z, --context
-f, --file-system
-c
--format=FORMAT
--printf=FORMAT
-t, --terse
--help
--version
-L, --dereference
follow links
-Z, --context
print the security context information if available
-f, --file-system
display file system status instead of file status
-c
--format=FORMAT
use the specified FORMAT instead of the default; output a newline after each use of FORMAT
--printf=FORMAT
like --format, but interpret backslash escapes, and do not output a mandatory trailing newline. If you want a newline, include \n in FORMAT.
-t, --terse
print the information in terse form
--help
display this help and exit
--version
output version information and exit
The valid format sequences for files (without --file-system):
%a Access rights in octal
%A Access rights in human readable form
%b Number of blocks allocated (see %B)
%B The size in bytes of each block reported by %b
%d Device number in decimal
%D Device number in hex
%f Raw mode in hex
%F File type
%g Group ID of owner
%G Group name of owner
%h Number of hard links
%i Inode number
%n File name
%N Quoted file name with dereference if symbolic link
%o I/O block size
%s Total size, in bytes
%t Major device type in hex
%T Minor device type in hex
%u User ID of owner
%U User name of owner
%x Time of last access
%X Time of last access as seconds since Epoch
%y Time of last modification
%Y Time of last modification as seconds since Epoch
%z Time of last change
%Z Time of last change as seconds since Epoch
Valid format sequences for file systems:
%a Free blocks available to non-superuser
%b Total data blocks in file system
%c Total file nodes in file system
%d Free file nodes in file system
%f Free blocks in file system
%C Security context in SELinux
%i File System ID in hex
%l Maximum length of filenames
%n File name
%s Block size (for faster transfers)
%S Fundamental block size (for block counts)
%t Type in hex
%T Type in human readable form
NOTE: your shell may have its own version of stat, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports.
The valid format sequences for files (without --file-system):
%a Access rights in octal
%A Access rights in human readable form
%b Number of blocks allocated (see %B)
%B The size in bytes of each block reported by %b
%d Device number in decimal
%D Device number in hex
%f Raw mode in hex
%F File type
%g Group ID of owner
%G Group name of owner
%h Number of hard links
%i Inode number
%n File name
%N Quoted file name with dereference if symbolic link
%o I/O block size
%s Total size, in bytes
%t Major device type in hex
%T Minor device type in hex
%u User ID of owner
%U User name of owner
%x Time of last access
%X Time of last access as seconds since Epoch
%y Time of last modification
%Y Time of last modification as seconds since Epoch
%z Time of last change
%Z Time of last change as seconds since Epoch
Valid format sequences for file systems:
%a Free blocks available to non-superuser
%b Total data blocks in file system
%c Total file nodes in file system
%d Free file nodes in file system
%f Free blocks in file system
%C Security context in SELinux
%i File System ID in hex
%l Maximum length of filenames
%n File name
%s Block size (for faster transfers)
%S Fundamental block size (for block counts)
%t Type in hex
%T Type in human readable form
NOTE: your shell may have its own version of stat, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports.
EXAMPLES
stat /etc/fstab
File: `/etc/fstab' Size: 1739 Blocks: 16 IO Block: 4096 regular file Device: 301h/769d Inode: 1710137 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2013-02-07 16:52:22.000000000 +0100 Modify: 2012-09-03 08:06:38.000000000 +0200 Change: 2012-09-03 08:06:38.000000000 +0200
stat -Z /etc/fstab
File: `/etc/fstab' Size: 1739 Blocks: 16 IO Block: 4096 regular file Device: 301h/769d Inode: 1710137 Links: 1 Device type: 0,0 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) S_Context: root:object_r:etc_t:s0 Access: 2013-02-07 16:52:22.000000000 +0100 Modify: 2012-09-03 08:06:38.000000000 +0200 Change: 2012-09-03 08:06:38.000000000 +0200
stat -c "%s" /etc/fstab
1455
stat -c "%y" /etc/fstab
2013-05-23 12:05:00.000000000 +0200
stat -c "%.10y" /etc/fstab
2013-05-23
ls -l /etc/fstab
-rw-r--r-- 1 root root 1455 2013-05-23 12:05 /etc/fstab
stat -c '%a %n' /*
755 /bin 755 /boot 755 /dev 755 /etc 755 /home 755 /lib 700 /lost+found 755 /media 755 /mnt 555 /proc 750 /root 755 /sbin 755 /selinux 755 /srv 755 /sys 1777 /tmp 755 /usr 755 /var
Zmodyfikowany ostatnio: 2014/05/15 10:01:29 (10 lat temu),
textsize: 4,88 kB,
htmlsize: 6,29 kB
Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników