File Storage and Compression
quotaLuria has a disk usage quota on the head node. You can use the
quotacommand to check what the size of the quota is and how much space you're currently using.The
-sflag will display the quota in a human-readable format. (e.g. 18K, 14M, 65G).
quota -s
Disk quotas for user asoberan (uid 247789):
Filesystem space quota limit grace files quota limit grace
/dev/mapper/cl-home
4391M 18432M 100G 24925 0 0
# Space column shows how much space you're currently using on the head node
# Quota column is total amount of space allotted to youduStands for "disk usage". Reports how much disk space a directory is taken up.
Defaults to displaying the disk usage in kilobytes, but passing it the
-hflag will return disk usage in a human-readable format. (e.g. 18K, 14M, 65G).Will search the entire depth of the Unix tree starting from the directory you give it. You can control the depth which it searches by passing the
-d <num>flag.
# Displays the disk usage of every file under your home directory
# The last entry will be the disk usage of your entire home directory
du -h ~
# Displays the disk usage of every file and directory immediately
# under your home directory
du -h -d 1 ~
# Displays the disk usage of one file, file.txt
du -h file.txttarCombines multiple files or directories into one archive for easy sharing. Similar to "zipping" files, however tar does not compress by default.
Create an archive by passing the
-cfflagsCan compress multiple files/folders using
gzipby passing the-zflag when creating a new archive.Useful when you have files that take up a lot of space and you want to save space.
Extract an archive by passing the
-xfflags. Un-compress an archive by passing the-zflag to those two flags.
# Create an archive of a directory and name it my_directory.tar
tar -cf my_directory.tar <directory>
# Create a compressed archive of a directory and
# name it my_compressed_directory.tar.gz
tar -czf my_compressed_directory.tar.gz <directory>
# Extract archive my_directory.tar
tar -xf my_directory.tar
# Uncompress the archive my_compressed_directory.tar.gz
tar -xzf my_compressed_directory.tar.gzzipZip multiple files and directories into one file. Zipping is similar to archiving with
tar, but zipped files are easier to deal with on Windows machines.
# Zip a directory to the file my_directory.zip
zip my_directory.zip <directory>
# Unzip my_directory.zip
unzip my_directory.zipLast updated
Was this helpful?
