TL;DR: ncdu
, du -h -d1 /
.
On a system where you have root access, you should install the utility ncdu, which offers a friendly way of scanning and displaying the space occupied by the folders in the current directory ncdu
(or in the folder sent as parameter when starting the utility: ncdu /
).
If you don’t have root access, but you have the ncdu utility pre-installed, you won’t see the true size of the folders, so you should execute sudo ncdu /
.
If you don’t have root access and you don’t have the ncdu
utility at hand, you are stuck with the old du
utility, which by default is pretty verbose (shows the size of each subfolder – if you’re in the root folder, it’s hard to get some meaningful info from the whole screens of data reported), so you should use some parameters to filter the output:
du -h -d1 /
– use the ‘human’-style display (-h) to show the size in Kb, Mb, Gb, and the depth flag (-d, –max-depth) to help control the depth of directories that the command reports on.du -cBM – max-depth=1 /var/lib/ 2>&1 | grep -v 'denied' | sort -n
– to skip displaying errors in case of denied acces to some folders and to sort by size, descending, the remaining first-level folders.Enjoy!
TL;DR : cd ~/public_html/var/session/ && ls -1 | wc -l && perl -e 'for(<*>){((stat)[9]<(unlink))}' && ls -1 | wc -l
with a close follower from rsync: rsync -a – delete /tmp/empty/ ~/public_html/var/session/
.
I had to delete ~1.700.000 files in a Magento ./var/session/ folder
Count the initial number of files:
cd ~/public_html/var/session/
ls | wc -l
So I started looking on other solutions on the wild web and I came to this Kinamo post: Efficiently delete a million files on Linux servers that had 4 variants:
Details on those variants:
Beside that post, I found another solution proposed on a Unix StackExchange thread: Faster way to delete large number of files [duplicate] which had answers on another one: Efficiently delete large directory containing thousands of files. The solution was a delete-in-5000-files-batches script:
#!/bin/bash # Path to folder with many files FOLDER="/path/to/folder/with/many/files" # Temporary file to store file names FILE_FILENAMES="/tmp/filenames" if [ -z "$FOLDER" ]; then echo "Prevented you from deleting everything! Correct your FOLDER variable!" exit 1 fi while true; do FILES=$(ls -f1 $FOLDER | wc -l) if [ "$FILES" -gt 10000 ]; then printf "[%s] %s files found. going on with removing\n" "$(date)" "$FILES" # Create new list of files ls -f1 $FOLDER | head -n 5002 | tail -n 5000 > "$FILE_FILENAMES" if [ -s $FILE_FILENAMES ]; then while read FILE; do rm "$FOLDER/$FILE" sleep 0.005 done < "$FILE_FILENAMES" fi else printf "[%s] script has finished, almost all files have been deleted" "$(date)" break fi sleep 5 done
Stats for my test:
Obviously, the rsync is the fastest solution for deleting a huge number of files!
PS. There was another solution on one of the stackexchange threads above, that claimed that a Perl one-liner would be even faster:
cd ~/public_html/var/session/ && ls -1 | wc -l && perl -e ‘for(<*>){((stat)[9]<(unlink))}' && ls -1 | wc -lI tested it and it was really faster…
Browsere folosite:
Mobile browsers: Chrome, Dolphin, UC Browser, Puffin, Iron, Yandex Browser
Windows: I2PsBrowserPortable, Brave, CentBrowser, Epic Privacy Browser, FlashPeak SlimBrowser, FreeNet, Google Chrome, Mozilla Firefox, Opera, Opera Neon, Polarity, UC Browser, Cent
Linux: Chrome, Opera, Chromium, Firefox, …
HTML format | |||||
---|---|---|---|---|---|
|
——————- Date contract ———————–
Dezvoltator / vanzator / adminstrator
Garantie imobil (e trecuta in contract?)
Asociatie de proprietari constituita?
Cota indiviza teren de sub cladire pentru fiecare proprietar
Schite amplasare tevi apa / cabluri electrice in podea/pereti
Pret acte notariale (prima casa / credit ipotecar)
——————- Date pozitionare complex ———————–
Stare drum de acces de la soseaua principala cea mai apropiata la complex
Posibilitate acces rapid ambulanta/pompieri in interiorul complexului
Infrastructura servicii publice – farmacii, RATB/Metrou, parc, scoli, gradinite, supermarket
Management acumulari de apa/zapada in timpul ploilor/zapezilor puternice
Furnizor servicii Internet/TV/Tel in complex
Spatii joaca copii
Puncte de paza intrare/iesire
Pozitionare garaj: la suprafata / la subsol (intrare/iesire diferite)
——————– Date bloc ———————-
Data incepere/dare in folosinta bloc
Stare generala cladire, holuri, subsol – varuit, crapaturi, igrasie, finisari
Adancimea fundatiei – sub nivel(uri) subsol
Grosime cabluri fierbeton in fundatie / pereti
Peretii exteriori – grosime, material (bca / caramida / monolit)
Peretii interiori – grosime, material (bca / caramida)
Hidroizolatie (acoperis, vopsea exterior care nu permite trecerea apei)
Termoizolatie (grosime – 10cm)
Racordare cladire la electricitate, apa, canalizare (sa nu fie cu fosa)
(Stare statie pompare apa – calitate, rugina vizibila)
Marime ascensoare / pozitionare scara
——————–Date apartamente ———————-
Pret (EUR)/m util (interior+terasa/balcon), Pret (EUR)/m construit (total)
Schita apartament, suprafete utile/construite
Vedere exterioara / obiective inconjuratoare importante
Orientare geografica apartament
Stare ocupare apartamente deasupra/dedesubt
Costuri intretinere la comun (apa, paza, lift, curatenie)
Costuri facturi – consum/apartament (gaz, electricitate, apa)
Localizare apometre, contor electric, contor gaze (in apartament / hol comun / subsol)
Peretii interiori – racorduri finalizate la utilitati: gaze, apa, electricitate
Pervazuri geamuri – sunt inclinate inspre exterior?
Panta gresie baie/balcon – e inclinata corect spre gaura de scurgere?
Aerisire baie – geam catre exterior / gura aerisire
Bucatarie – deschisa/inchisa
Inchidere bucatarie: gratis/contra cost/diferenta pentru personalizare
Stare/calitate instalatii sanitare/electrice, pereti varuiti
Calitate/marca centrala termica (boiler incorporat/extern)
Calitate/stare (Pregatire instalare) aer conditonat (evacuare la geam/pe acoperis [la comun])
Calitate/marca termopane / usa (izolare termica/fonica)
Calitate/marca parchet, gresie/faianta
Incalzire apartament: calorifere (dimensiune/camera) / in pardoseala
Numar/pozitionare prize electrice/internet in camere
.
HTML format | ||||||||
---|---|---|---|---|---|---|---|---|
|
||||||||
Text format | ||||||||
|
Cu ocazia sarbatorilor de Paste, va urez sa aveti parte de un Paste cat se poate de fericit impreuna cu cei dragi voua si sa va pastrati in suflet bunatatea si omenia prilejuite de aceasta sarbatoare cat se poate de mult (daca se poate, chiar pana in urmatorul an)!
Teo