shell basics
In this session, we will introduce shell scripriting and have a look at the most basic scripting commands. Hang tight.
- What is the shell?
- Navigation
- Looking around
- A guided tour
- Manipulating files
- Working with commands
- Reading man pages
- Keyboard shortcuts
- LTS
- Shebang
cd
ls
pwd
less
file
ln
cp
mv
rm
mkdir
type
which
help
man
By the end of this project, you should be able to explain to anyone Without the help of google the following concepts
- What does RTFM mean?
- What is shebang?
- What is the shell
- What is the difference between a terminal and a shell
- What is the shell prompt
- How to use the history (the basics)
- What do the commands or built-ins
cd
,pwd
,ls
do - How to navigate the filesystem
What are the
.
and..
directories - What is the working directory, how to print it and how to change it
- What is the root directory
- What is the home directory, and how to go there
- What is the difference between the root directory and the home directory of the user root
- What are the characteristics of hidden files and how to list them
- What does the command cd - do
- What do the commands
ls
,less
,file
do - How do you use options and arguments with commands
- Understand the
ls
long format and how to display it - A Guided Tour
- What does the
ln
command do - What do you find in the most common/important directories
- What is a symbolic link
- What is a hard link
- What is the difference between a hard link and a symbolic link
- What do the commands
cp
,mv
,rm
,mkdir
do - What are wildcards and how do they work
- How to use wildcards
- What do
type
,which
,help
,man
commands do - What are the different kinds of commands
- What is an alias
- When do you use the command
help
instead ofman
- How to read a man page
- What are man page sections
- What are the section numbers for User commands, System calls and Library functions
- Common shortcuts for Bash
- Where am I? : A script that prints the absolute path of the current working directory.
- What's in there? : A script that displays the contents of your current directory.
- There is no place like home : A script that changes the working directory to the user's home directory.
- The long format : A script that displays the current directory contents in a long format.
- Hidden files : A script that displays the current directory contents including hidden files.
- I loce numbers : A script that displays the current directory contents, using long format, while displaying group IDs in numeral and show hidden files.
- Welcome holberton : A script that will create a directory named
holberton
in the/tmp/
directory. - Betty in Holberton : A scipt that will move a file called
betty
from home to the new directory created above. - Bye bye Betty : A script that will delete file
betty
from the new location. - Bye bye Holberton : A script that will delete the directory
holberton
that is in the/tmp/
directory path. - Back to the future Change working directory to the previous one.
- Lists List all files (even ones with names beginning with a period character, which are normally hidden) in the current directory and the parent of the working directory and the /boot directory (in this order), in long format.
- File type A script that prints the type of the named file
iamafile
. Theiamafile
will be in the/tmp/
directory when we will run your script. - We are symbols, and inhabit symbols Create a symbolic link to
/bin/ls
, named__ls__
. The symbolic link should be created in the current working directory. - Copy HTML files Create a script that copies all
html
files from the current working directory to the parent working directory while only copying files that did not exist. - Let's move A script that moves all files beginning with an uppercase letter to the directory
/tmp/u
. - Clean Emacs A script that deletes all files in the current directory that end with the character
~
. - Tree A script that creates the directory
welcome/
,welcome/to/
andwelcome/to/holberton
. - Life is a series of commas, not periods A script that lists all the files and directories of the current directory separated by commas
,
. - File type: Holberton Create a magic file
holberton.mgc
that can be used with the commandfile
to detectHolberton
data files always contain the stringHOLBERTON
at offset 0.