linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:39:58 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info
Manipulating files


cp - copy one or more files

Format
cp [options] source-file destination-file
cp [options] source-file-list destination-directory

Summary
The program has two modes. You can copy one file into another. Or copy a file from one place to another.
You can use wildcards * and ?.

Options
-r    Copies directories recursively. With this i mean that all files including subdirectories and their content given by source-file-list will be copied to the destination directory.

df - disk free displays the amount of available disk space

Format
df [options] [filesystem-list]

Summary
If you don't specify the filesystem-list, df will list the amount of available disk space on all mounted filesystems

Options
-t type, causes df to display information about the type of the filesystems of the specifies type.


du - disk used

Format
du [directory-list]

Summary
Lists the diskspace used by the directory and its contents specified by the directory-list argument


find - find a file

Format
find directory expression

Summary
directory specifies the directory where you want the search to start. Find will search all directories recursively.
expression is the search argument. These are the most common used:

Search arguments
-name filename,     searches for the given filename
-user name,     list all files who are owned by the given users
-size +/-n,     lists all files with size smaller/greater than n


ln - make a link to a file

Format
ln [option] existing-file new-link

Summary
Creates a hard link to the file specified by existing-file with the name given by the new-link argument. A hard link to a file is indistinguishable from the original. A hard link has to be on the same filesystem as the original file. A symbolic link may be across filesystems and existing file and new-link may be directories as well as files.

Options
-s creates a symbolic link instead


locate - locates files

Format
locate pattern

Summary
Lists all files in filedatabase that match the given pattern.
This utility depends on a database file with al list of all files on your filesystem. Use the updatedb utility to update your database (caution, this takes a while)

Example
#locate hepp
This search would find all files on you system that contain hepp. It would find heppgr, tghepp and tyheppl.

mkdir - make directory

Format
mkdir [options] directory-list

Summary
Creates a new directory. If you write #mkdir test, mkdir creates a new directory with the name "test" in the current directory.         
If you want mkdir to make a directory in another directory, you must specify the whole directory path.

Options
-p parent, if the parent directory of the directory you are creating does not exist, mkdir will create it for you.

mv - move files

Format
mv [options] source-path destination-path

Summary
Copies the the files specified in source-path to destination path and then deletes the original files.
You can use wildcards * and ?.


rm - remove files

Format
rm [options] file-list

Summary
This utility removes files from your system. You can use wildcards * and ?.
Note: when you delete a file it is not possible to recover it.

Options
-r     recursive, this option makes rm remove the specified directory and all of its contents. (MS USERS: Just like deltree) BE CAREFUL WITH THIS COMMAND!!
-f     force, this option makes rm delete files without asking you if you really want to. Nice if you want to delete directories.

rmdir - remove directory

Format
rmdir directory-list

Summary
Removes all directories specified by directory-list.
Note: The directories you want to delete must be empty. If they are not, mkdir will fail. If you want to delete a directory together with its contents use rm.


Table Of Contents

[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
Copyright © 1999 All Rights Reserved
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif