This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:unix:fall2023:projects:dac0 [2023/09/01 18:42] – [Pulling changes from server] abowes2 | notes:unix:fall2023:projects:dac0 [2023/09/05 23:59] (current) – [Updating current repository] jbernata | ||
---|---|---|---|
Line 4: | Line 4: | ||
It would be especially useful to review the manual pages or any documentation on the following resources: | It would be especially useful to review the manual pages or any documentation on the following resources: | ||
- | * **ls**(**1**) - lists files | + | * **ls**(**1**) - lists files. |
- | * **zip**(**2**) - compresses files into a smaller form | + | * **ls -l**(**1**) - allows you to see additional information on all of your current directory' |
- | * **rev**(**3**) - allows you to reverse the text in a txt.file | + | * **zip**(**1**) - compresses files into a smaller form. |
- | * **uuencode**(**5**) - allows you to archive files and directories | + | * **rev**(**1**) - allows you to reverse the text in a txt.file. |
+ | * **tac**(**1**) - allows you to flip the text around vertically, so that the bottom text will become the top text and the top text will become the bottom text. | ||
+ | * **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/ | ||
+ | * **rm -rf directoryname**(**1**) allows you to remove a directory as well as the files in the directory and subdirectories. | ||
=====Background===== | =====Background===== | ||
====What is an archive==== | ====What is an archive==== | ||
+ | An archive is where you take multiple files and place them all in the same file. The new archive file would be the same size as if you added all of the sizes from the different files together.If you were to put 7, 10 mb into an archive, the archive would be the size of 50 mb. Tar is a command which does both archiving and a bit of compression. | ||
====What actions can be performed on an archive? | ====What actions can be performed on an archive? | ||
+ | On an archive you can view the contents, append the contents, extract some of the contents, or ' | ||
====What is compression==== | ====What is compression==== | ||
+ | Compression is a technique used to reduce file size. | ||
====How does compression differ from archiving? | ====How does compression differ from archiving? | ||
+ | Short answer: Archiving stores multiple files in one file without changing the size the files take up, compression changes the bit pattern to reduce the size of the file or files. | ||
====Types of compression (lossy vs lossless)==== | ====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===== | =====Procedure===== | ||
- | In the UNIX class Public Directory on lab46 you will find a **dac0/** subdirectory. You can use the **grabit** command | + | In the UNIX class Public Directory on lab46 you will find a **dac0/** subdirectory. You can reach the directory by **cd / |
+ | Next unzip each of the files using tar "-cf file.tar" | ||
+ | |||
+ | Check each of the text files, some are in English and others you will have to reverse, flip, or decode using the commands in the toolbox above. | ||
+ | |||
+ | Once this is done use the stat "-c %s filename" | ||
=====Repository Operations===== | =====Repository Operations===== | ||
Line 37: | Line 50: | ||
====Pushing commits upstream to server==== | ====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==== | ====Pulling changes from server==== | ||
You can pull changes from the server by using the "Hg pull" command. | You can pull changes from the server by using the "Hg pull" command. | ||
====Updating current repository==== | ====Updating current repository==== | ||
+ | hg update to update your system after everything has been pulled |