Knowledgebase

Managing Files and Archives Efficiently Print

  • developersgitdeployment, developers, backup, diskspace, uploads, database, hacked, caching
  • 0

Command line file work that saves real time.

UPLOADING A SITE

Zip it locally, upload the single archive, and extract on the server. Dramatically faster and more reliable than transferring thousands of small files.

unzip extracts. tar handles .tar.gz archives.

ARCHIVING FOR BACKUP

tar creates a compressed archive of a directory. Combined with a database dump, that is a complete site backup you can download.

COPYING BETWEEN DIRECTORIES

cp -r copies a directory tree. rsync is better for large copies, since it can resume and shows progress.

FINDING LARGE FILES

Combining find with a size filter locates what is consuming your quota.

FINDING RECENTLY CHANGED FILES

find with a time filter shows what changed in the last day. This is the fastest way to identify what a compromise touched, or what an update modified.

CLEANING UP

Old backup archives, cache directories and log files are the usual space consumers. Check before deleting anything you did not create.

COUNTING FILES

Inode limits are hit more often than disk limits. Counting files per directory identifies the cause.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot