Introduction to Shell
The Unix command line helps users combine existing programs in new ways, automate repetitive tasks, and run programs on clusters and clouds.
Start Course for Free4 hours55 exercises131,971 learnersStatement of Accomplishment
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Training 2 or more people?
Try DataCamp for BusinessLoved by learners at thousands of companies
Course Description
The Unix command line has survived and thrived for almost 50 years because it lets people do complex things with just a few keystrokes. Sometimes called "the universal glue of programming," it helps users combine existing programs in new ways, automate repetitive tasks, and run programs on clusters and clouds that may be halfway around the world. This course will introduce its key elements and show you how to use them efficiently.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.In the following Tracks
Associate Python Developer
Go To TrackMachine Learning Engineer
Go To TrackProfessional Data Engineer in Python
Go To Track- 1
Manipulating files and directories
FreeThis chapter is a brief introduction to the Unix shell. You'll learn why it is still in use after almost 50 years, how it compares to the graphical tools you may be more familiar with, how to move around in the shell, and how to create, modify, and delete files and folders.
How does the shell compare to a desktop interface?50 xpWhere am I?50 xpHow can I identify files and directories?50 xpHow else can I identify files and directories?100 xpHow can I move to another directory?100 xpHow can I move up a directory?50 xpHow can I copy files?100 xpHow can I move a file?100 xpHow can I rename files?100 xpHow can I delete files?100 xpHow can I create and delete directories?100 xpWrapping up100 xp - 2
Manipulating data
The commands you saw in the previous chapter allowed you to move things around in the filesystem. This chapter will show you how to work with the data in those files. The tools we’ll use are fairly simple, but are solid building blocks.
How can I view a file's contents?100 xpHow can I view a file's contents piece by piece?100 xpHow can I look at the start of a file?50 xpHow can I type less?100 xpHow can I control what commands do?100 xpHow can I list everything below a directory?100 xpHow can I get help for a command?100 xpHow can I select columns from a file?50 xpWhat can't cut do?50 xpHow can I repeat commands?100 xpHow can I select lines containing specific values?100 xpWhy isn't it always safe to treat data as text?50 xp - 3
Combining tools
The real power of the Unix shell lies not in the individual commands, but in how easily they can be combined to do new things. This chapter will show you how to use this power to select the data you want, and introduce commands for sorting values and removing duplicates.
How can I store a command's output in a file?100 xpHow can I use a command's output as an input?100 xpWhat's a better way to combine commands?100 xpHow can I combine many commands?100 xpHow can I count the records in a file?100 xpHow can I specify many files at once?100 xpWhat other wildcards can I use?50 xpHow can I sort lines of text?100 xpHow can I remove duplicate lines?100 xpHow can I save the output of a pipe?50 xpHow can I stop a running program?100 xpWrapping up100 xp - 4
Batch processing
Most shell commands will process many files at once. This chapter shows you how to make your own pipelines do that. Along the way, you will see how the shell uses variables to store information.
How does the shell store information?50 xpHow can I print a variable's value?100 xpHow else does the shell store information?100 xpHow can I repeat a command many times?100 xpHow can I repeat a command once for each file?100 xpHow can I record the names of a set of files?50 xpA variable's name versus its value50 xpHow can I run many commands in a single loop?100 xpWhy shouldn't I use spaces in filenames?50 xpHow can I do many things in a single loop?50 xp - 5
Creating new tools
History lets you repeat things with just a few keystrokes, and pipes let you combine existing commands to create new ones. In this chapter, you will see how to go one step further and create new commands of your own.
How can I edit a file?100 xpHow can I record what I just did?100 xpHow can I save commands to re-run later?100 xpHow can I re-use pipes?100 xpHow can I pass filenames to scripts?100 xpHow can I process a single argument?50 xpHow can one shell script do many things?100 xpHow can I write loops in a shell script?100 xpWhat happens when I don't provide filenames?50 xp
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.In the following Tracks
Associate Python Developer
Go To TrackMachine Learning Engineer
Go To TrackProfessional Data Engineer in Python
Go To TrackIn other tracks
R Developercollaborators
Filip Schouwenaars
See MoreData Science Instructor at DataCamp
Filip is the passionate developer behind several of DataCamp's most popular Python, SQL, and R courses. Currently, Filip leads the development of DataCamp Workspace, a collaborative data science notebook. Under the motto 'Eat your own dog food', he uses Workspace to understand how users learn on and interact with DataCamp. Filip holds degrees in Electrical Engineering and Artificial Intelligence.
FAQs
Join over 15 million learners and start Introduction to Shell today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.