Difference between revisions of "Basics"
From Amahi Wiki
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | See [[Linux-hda commands|Linux HDA Commands]] for Amahi HDA-specific commands. | |
− | See [[Linux-hda commands|Linux HDA Commands]] for Amahi specific commands. | ||
This is a small Linux cheat sheet, introducing the very basic and very essential commands for surviving at the Linux Command Line Interface (CLI). | This is a small Linux cheat sheet, introducing the very basic and very essential commands for surviving at the Linux Command Line Interface (CLI). | ||
Line 54: | Line 53: | ||
<td>less</td> | <td>less</td> | ||
<td>View text files and paginate them if needed.</td> | <td>View text files and paginate them if needed.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>[[Linux-find|find]]</td> | ||
+ | <td>find files or directories.</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
===Manipulating files and directories=== | ===Manipulating files and directories=== | ||
Line 103: | Line 105: | ||
<td>rmdir</td> | <td>rmdir</td> | ||
<td>Remove an empty directory.</td> | <td>Remove an empty directory.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>nano</td> | ||
+ | <td>Interactively edit a text file (sort of the command line equivalent to notepad.exe or TextEdit)</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | ===Files | + | ===Files/Directory Permissions=== |
<table border="1"> | <table border="1"> | ||
<tr> | <tr> | ||
Line 129: | Line 135: | ||
'''NOTE:''' [http://www.webune.com/an-example-code-script-of-javascript-linux-permission-chart-table-chmod-s81.html Linux Permission Chart Table] calculates based on user input. | '''NOTE:''' [http://www.webune.com/an-example-code-script-of-javascript-linux-permission-chart-table-chmod-s81.html Linux Permission Chart Table] calculates based on user input. | ||
+ | |||
+ | Another good link on the basics of [http://www.ahinc.com/linux101/permission.htm linux permissions]. | ||
+ | |||
+ | === CRON Tester === | ||
+ | [http://cron.schlitt.info/ CRON Tester] and [http://www.cronchecker.net cron checker] will show you what your CRON definition equates too in time and frequency. | ||
+ | |||
+ | For example, <code>0 2 * * *</code> equates to ''2AM daily''. |
Latest revision as of 01:53, 7 February 2015
See Linux HDA Commands for Amahi HDA-specific commands.
This is a small Linux cheat sheet, introducing the very basic and very essential commands for surviving at the Linux Command Line Interface (CLI).
Contents
Moving around in the file system
Command | Action |
---|---|
pwd | "Print working directory" - show what dir you're in. |
ls | List the contents of a dir. |
ls -l | List the contents of a dir and show additional info of the files. |
ls -a | List all files, including hidden files. |
cd | Change directory. |
cd .. | Go to the parent directory. |
Examining files
Command | Action |
---|---|
file | Determine the type of a file. |
cat | Concatenate a file. |
less | View text files and paginate them if needed. |
find | find files or directories. |
Manipulating files and directories
Command | Action |
---|---|
cp | Copy a file. |
cp -i | Copy a file and ask before overwriting. |
cp -r | Copy a directory with its contents. |
mv | Move or rename a file. |
mv -i | Move or rename a file and ask before overwriting. |
rm | Remove a file. |
rm -r | Remove a directory with its contents. |
rm -i | Ask before removing a file. Good to use with the -r option. |
mkdir | Make a directory. |
rmdir | Remove an empty directory. |
nano | Interactively edit a text file (sort of the command line equivalent to notepad.exe or TextEdit) |
Files/Directory Permissions
Command | Action |
---|---|
chown | Change ownership |
chgrp | Change group |
chmod | Change permissions |
NOTE: Linux Permission Chart Table calculates based on user input.
Another good link on the basics of linux permissions.
CRON Tester
CRON Tester and cron checker will show you what your CRON definition equates too in time and frequency.
For example, 0 2 * * *
equates to 2AM daily.