Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Perl: Dateigröße

Empfohlene Antworten

Moin moin,

wie kann ich denn die größe einer Datei in Perl ermitteln?

Danke

foreach (@ARGV) {

next unless -f;

$fileSize = -s _;

print("$_ ist $fileSize bytes lgross.\n");

}

Aufrufen mit "Skriptname Dateiname".

yep, so gehts für externe Dateien.

Ich brauchte es nur im Programm. Das geht dann mit.

$laenge = (stat, $filename)[7];

Diese Funktion liefer 13 Elemente zurück. Hier mal die Liste bestehend aus unix commands.

1 dev

2 ino

3 mode

4 nlink

5 uid

6 gid

7 rdev

8 size

9 atime

10 mtime

11 ctime

12 blksize

13 blocks

Ich wollte die groeße der Datei, also den bei 0 beginnend 7. Wert.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.