User Tools

Site Tools


notes:unix:fall2023:projects:dac0

This is an old revision of the document!


DAC0 project documentation

Toolbox

It would be especially useful to review the manual pages or any documentation on the following resources:

  • ls(1) - lists files
  • zip(1) - compresses files into a smaller form
  • rev(1) - allows you to reverse the text in a txt.file
  • uuencode(1) - allows you to archive files and directories
  • file(1) - allows you to see what kind of file a file is and if anything special needs to be done to it
  • stat -c %s(1) - allows you to see the byte size of a file
  • tar -xf archive.tar[.gz/bz2] allows you to extract tar, Tar Gz, and Tar Bz2 Archives.
  • rm -rf directoryname allows you to remove a directory as well as the files in the directory and subdirectories.

Background

What is an archive

What actions can be performed on an archive?

What is compression

Compression is a technique used to reduce file size.

How does compression differ from archiving?

Types of compression (lossy vs lossless)

The two types of compression are referred to as lossy and lossless. Lossy causes data to be lost during the compression process, while lossless techniques of compression allow original data to be reconstructed perfectly from the compressed data when the file is extracted.Hence the names lossy and lossless.

Procedure

In the UNIX class Public Directory on lab46 you will find a dac0/ subdirectory. You can use the grabit command to get copy dac0/ to your present directory.

Repository Operations

Checking current repository status

You can check the current repository status by using “hg status”

Adding untracked files to repository

You can add untracked files to your repository by using the “hg add -I -a” command. -I for include pattern -a for “All untracked”

Committing changes

To commit a file, you must use hg commit [file1, file2,…] command with the files that you already added. It will take you to a screen similar to nano or pico editors. Once there you can type a name for your commit and then press enter to accept the name. It will ask if you are sure that you want to save it to a confusing looking name. Press enter and it will return you to the command line. Use hg status to see if you can see any files that you just tried to commit. If you don't see them than your commit will have been successful.

Pushing commits upstream to server

To get your commit actually committed you should use “hg push” to push the file along to be pulled at a later time.

Pulling changes from server

You can pull changes from the server by using the “Hg pull” command.

Updating current repository

notes/unix/fall2023/projects/dac0.1693598146.txt.gz · Last modified: 2023/09/01 19:55 by abowes2