Ubuntu Tutorials - Herong's Tutorial Examples
∟Files and Directories
This chapter provides introductions and tutorial on file and directory management. Topics include commands to search and find files, read text files in different ways, split, join and truncate files, compress and restore files, archive and extract filesm.
"find" - Search for Files
"more", "head" and "cat" - Read Files
"split" and "cat" - Split and Join Files
Truncate Log Files
"compress/uncompress" - Compressed *.Z Files
"gzip/gunzip" - Compressed *.gz Files
"xz/unxz" - Compressed *.xz or *.lzma Files
"tar -c" and "tar -x" - Create and Extract Archive Files
"zip" and "unzip" - Create and Extract ZIP Files
"rar" and "unrar" - Roshal Archive Files
Takeaways:
- Use "find" command to search for files in a directory tree.
- Use "more" command to read a text one screen at a time.
- Use "head" command to the first 10 lines from a text file.
- Use "tail" command to the last 10 lines from a text file.
- Use "split" command to split a large file into chunks.
- Use "cat" command to join multiple files into a single file.
- Use "compress" command to compress a large file into a *.Z file using the adaptive Lempel-Ziv algorithm.
- Use "uncompress" command to uncompress a *.Z file.
- Use "gzip" command to compress a large file into a *.gz file using the Lempel-Ziv algorithm.
- Use "gunzip" command to restore a *.gz file.
- Use "xz" command to compress a large file into a *.xz file using the LZMA2 algorithm.
- Use "unxz" command to restore a *.xz file.
- Use "tar -c" command to create an archive file from given files and directories.
- Use "tar -x" command to extract files and directories out of a given archive file.
- Use "tar -c -z" command to apply "gzip" compression on the new archive file.
- Use "zip -r" command to create a ZIP file from given files and directories.
- Use "unzip" command to extract files and directories out of a given ZIP file.
- Use "truncate" command to truncate existing files, useful for managing log files.
- Install "unrar" package to extract files from RAR archive files.
Table of Contents
About This Book
Introduction to Ubuntu Systems
GNOME - Desktop Interface and Environment
Shell - The Command-Line Interpreter
Process Management
Memory Management
►Files and Directories
APT (Advanced Package Tool)
Network Connection on Ubuntu
Internet Networking Tools
SSH Protocol and ssh/scp Commands
Administrative Tasks
References
Full Version in PDF/EPUB