mirror of
https://github.com/cliffe/HacktivityLabSheets.git
synced 2026-02-21 11:18:09 +00:00
Update Linux command cheat sheet formatting and enhance lab layout
- Changed command examples in the Linux cheat sheet to use code formatting for better readability. - Updated the lab metadata section to hide when embedded, improving the layout. - Renamed "Table of Contents" to "Contents" for consistency in the lab layout.
This commit is contained in:
@@ -99,14 +99,14 @@ Here’s a brief cheat sheet of some common Linux/Unix commands:
|
||||
|
||||
| Command | Simplified description | Example usage |
|
||||
| :---- | :---- | :---- |
|
||||
| pwd | Check your current location in the file system | pwd |
|
||||
| ls | Lists all the files in your current working directory, similar to “dir” on windows (-la shows details) | ls \-la |
|
||||
| cp | Copies files (-r to recursively copy directory contents) | cp file1 copy\_of\_file1 |
|
||||
| mv | Moves (or renames) a file or directory | mv file1 file2 |
|
||||
| cat | Prints the contents of a file to the console | cat file1 |
|
||||
| echo | Prints a message to the screen | echo “hello, world\!” |
|
||||
| mkdir | Makes a directory | mkdir newdirectory |
|
||||
| cd | Change working directory, to “move us into a different directory” | cd newdirectory |
|
||||
| `pwd` | Check your current location in the file system | `pwd` |
|
||||
| `ls` | Lists all the files in your current working directory, similar to “dir” on windows (-la shows details) | `ls -la` |
|
||||
| `cp` | Copies files (-r to recursively copy directory contents) | `cp file1 copy_of_file1` |
|
||||
| `mv` | Moves (or renames) a file or directory | `mv file1 file2` |
|
||||
| `cat` | Prints the contents of a file to the console | `cat file1` |
|
||||
| `echo` | Prints a message to the screen | `echo "hello, world!"` |
|
||||
| `mkdir` | Makes a directory | `mkdir newdirectory` |
|
||||
| `cd` | Change working directory, to “move us into a different directory” | `cd newdirectory` |
|
||||
|
||||
> Tip: If you ever get lost within the file structure, you can type "cd" on its own (no directory name afterwards) and you'll return to your home folder. To go up just one level within the file system, type "cd .." ("cd", followed by a space then two full-stops.)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ layout: default
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="lab-metadata">
|
||||
<div class="lab-metadata hidden-when-embedded">
|
||||
{% if page.author %}
|
||||
<div class="metadata-item">
|
||||
<strong>{% if page.author.first %}Authors:{% else %}Author:{% endif %}</strong>
|
||||
@@ -83,7 +83,7 @@ layout: default
|
||||
|
||||
<div class="lab-content-body">
|
||||
<div id="toc-container" class="toc-container">
|
||||
<h2>Table of Contents</h2>
|
||||
<h2>Contents</h2>
|
||||
<ul id="toc-list"></ul>
|
||||
</div>
|
||||
{{ content }}
|
||||
@@ -487,6 +487,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Generate TOC items
|
||||
headings.forEach((heading, index) => {
|
||||
// Skip "Contents" heading
|
||||
if (heading.textContent.trim() === 'Contents') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create ID if it doesn't exist
|
||||
if (!heading.id) {
|
||||
heading.id = heading.textContent
|
||||
|
||||
Reference in New Issue
Block a user