- UNIX Tutorial for Beginners covers much of what gets covered in CSC220.
- LinuxCommand.org is the website for the CSC220 Linux book The Linux Command Line. The "Learning the Shell" link covers many of the commands we will talk about. There is also a link to download a free PDF of the book.
- Julia Evans Twitter creates excellent comics covering Linux commands and several other topics available at wizardszines.com. She does an greap job of distilling the important facts into 6 panels.
- Alex Petralia has a very nice nice overview of some of the most helpful Linux commands - Learn just enough Linux to get things done
- A good list of essential Linux commands
- How Unix Works
- A Really Friendly Command Line Intro is available free online (email registration required). This covers the most important commands you will use navigating around the command line.
- VIDEO Linux Tutorial for Beginners: Introductino to Linux Operating System is a 2 1/2 hour video that covers a lot of material.
- This Unix/Linux Command Cheatsheet is a great reference for the most commonly used Unix commands.
- A list of bash environment variables.
- Unix for Poets is a nice write up of text processing in Unix
- If you want to go deeper into what happens when you run different Linux commands, Safia Abdalla has posts that do a deep dive in to "cd", ls", "sudo" and more. Check the archive link.
- A book about the Linux kernel and its insides
- The 1010 of ELF files on Linux: Understanding an Analysis has some great information on the Executable and Linkable Format for Linux binaries.
- In Unix Everything is a File
You can use a semicolon to separate UNIX commands on a single command line. This allows you do to things like put a time stamp on the output of a command.
$ ls -l ; date
total 64
-rwxrwxr-x 1 Wade None 54373 Jun 14 17:51 a.exe
-rwxrwxr-x 1 Wade None 1061 Jun 14 17:51 test.c
Sun, Jun 14, 2015 5:56:51 PM- A good grep example
- You can also use awk to accomplish a lot of the same things you can do with grep
- You can schedule processes using cron. A good introduction.
- The Beginners Guide to Cron Jobs
- The official Ubuntu documentaion includes a nice CronHowto
- crontab guru has lots of crontab schedule examples and a translator
You can create a file with cat by redirecting output to a file. cat will read from stdin if no input file is given. ctrl-d ends input with a EOF.
$ cat > catfile
Here is a line.
Another line.
ctrl-d will put in an EOF.
$ cat catfile
Here is a line.
Another line.
ctrl-d will put in an EOF.Keep in mind that this will erase anything in the file you are redirecting to. Most commands that accept a file as a parameter will attempt to read from stdin if no filename is given.
- A nice tutorial on finding files in Linux
- Alvin Alexaner has has several examples of using the find command.
- A list of 35 practical examples of the linux find command
- Linux & Unix cut command tutorial with a lot of examples
- Alvin Alexaner has has several examples of using the cut command.
In UNIX, the wildcard * matches anything while ? will match a single letter. We can combine that with ls to get a list of files that, for example, start with h. The command "ls b?g" will list big, bag, bog, bkg, etc.
administrator@ubuntu:~$ ls h*
hello.c
administrator@ubuntu:~$ ls h?llo.c
hello.c
administrator@ubuntu:~$ ls h?ello.c
ls: cannot access h?ello.c: No such file or directoryWe can also redirect output to a file using the ">" character. The following example creates a file called mydir that holds the results of the "ls" command
administrator@ubuntu:~$ ls > mydir
administrator@ubuntu:~$ cat mydir
220
240
a.out
Desktop
Documents
Downloads
examples.desktop
hello.c
Music
mydir
news.txt
Pictures
Public
Templates
Videos- An introduction to bash scripting
- If you aren't happy with bash or the other shells, you can always just write your own.
- Implementating digital circuits using Unix pipes