Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

UNIX tips and tricks for a new user, Part 1: File maintenance tools

Tim McIntire, Consultant, Freelance Writer
Photo of Tim McIntire
Tim McIntire works as a consultant and co-founder of Cluster Corporation, a market leader in HPCC software, support, and consulting. He also contributes periodically to IBM developerWorks and Apple Developer Connection. Tim's research, conducted while leading the computer science effort at Scripps Institution of Oceanography's Digital Image Analysis Lab, has been published in a variety of journals, including Concurrency and Computation and IEEE Transactions on Geoscience and Remote Sensing. You can visit TimMcIntire.net to learn more.

Summary:  Systems administrators can use a number of programs to maintain files in a UNIX® system from the command line. In this tutorial, you'll experiment with commands, such as cd, cp, and tar, to navigate a UNIX file system from the command line and work with files and directories. The cd command changes directories, cp duplicates files or directories, and tar quickly groups files into an archive. You'll also learn how to deal with file permissions and perform simple input/output.

View more content in this series

Date:  26 Sep 2006
Level:  Intermediate PDF:  A4 and Letter (72 KB | 22 pages)Get Adobe® Reader®

Activity:  30637 views
Comments:  

To begin

One quick caveat before you begin: Many different UNIX-like distributions are currently available, ranging from commercial distributions, such as AIX, to free distributions, such as BSD and Linux. This tutorial focuses on commands and command-line options that are available in just about every distribution; if you find differences in your distributions, check your man pages (as described later).

Log in to the UNIX-like operating system of your choice to get started. When you log in, you should automatically start in your user's home directory. The examples use the tuser (Test User) username.

man

Before you work with specific commands, it's important to learn about man. man stands for manual; it's a critical tool for UNIX users who pride themselves on being self-sufficient. Type man application-name to see an explanation of anything you want to learn about. At each page in this tutorial, you're encouraged to check the man page along with the instructions.

Try typing the following (note that $ in this tutorial refers to your command prompt; in the examples, you should type what you see after the dollar sign):

 
$ man ls 
				

2 of 12 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Linux
ArticleID=162888
TutorialTitle=UNIX tips and tricks for a new user, Part 1: File maintenance tools
publish-date=09262006
author1-email=Tim.McIntire@gmail.com
author1-email-cc=