null
US
Sign In
Sign Up for Free
Sign Up
We have detected that Javascript is not enabled in your browser. The dynamic nature of our site means that Javascript must be enabled to function properly. Please read our
terms and conditions
for more information.
Next up
Copy and Edit
You need to log in to complete this action!
Register for Free
27820623
103.3 Perform basic file management
Description
103.3 Perform basic file management
No tags specified
103.3 perform basic file management
lpic-1
certificacion lpic-1
Mind Map by
Rolando Martinez
, updated more than 1 year ago
More
Less
Created by
Rolando Martinez
over 3 years ago
9
0
0
Resource summary
103.3 Perform basic file management
Introduction
Everything in Linux is a file,
copy files
delete files
cover the commands associated with file management.
A file is an entity that stores data and programs.
consists of content and meta data
file size, owner, creation date, permissions
types of files
Regular files
Directories
Special files
Manipulating Files
Using ls to List Files
ls
-l
-,:Regular file d,: directory file l: lnk file
-lh
human
-a
hidden files
Creating, Copying, Moving and Deleting Files
Create File
touch file1 file2 file3
touch -am file3
-a option changes only the access time, while the -m option changes only the modification time.
Copying Files with cp
cp file1 dir2
Moving Files with mv
mv myfile.txt /home/frank/Documents
mv old_file_name new_file_name
-i: interactive -f:forza
Deleting Files with rm
rm file1
rm -i file1
rm -f file1
rm file1 file2 file3
Creating and Deleting Directories
Creating Directory
mkdir dir1
mkdir dir1 dir2 dir3
mkdir -p parents/children
Removing Directories
rmdir dir1
rmdir dir1 dir2
rmdir -p parents/children
Recursive Manipulation of Files and Directories
ls -R mydirectory
ls -R animal
ls -R animal/
Recursive Copy with cp -r
tree mydir
mkdir newcopy
cp -r mydir newcopy
-r all the contents of mydir including itself are copied into newcopy.
Recursive Deletion with rm -r
rm newcopy/
rm -ri mydir/
Recursive Interactive
File Globbing and Wildcards
file globing
File globbing is a feature provided by the Unix/Linux shell to represent multiple filenames by using special characters called wildcards.
Wildcards
are essentially symbols which may be used to substitute for one or more characters
*
rm *: Delete all files in current working directory.
?
ls l?st
List all files with names beginning with l followed by any single character and ending with st.
[]
rmdir [a-z]*
Remove all directories whose name starts with a letter.
The Asterisk
find /home -name *.png
ls lpic-*.txt
cp -r animal/* forest
rm *ate*
The Question Mark
ls l?st.txt
ls ??st.txt
Bracketed Characters
ls l[aef]st.txt
ls l[a-z]st.txt
ls student-[0-9][A-Z].txt
Combining Wildcards
ls [plf]?st*
ls f*[0-9]+.txt
Guide Exercises
touch dog cat
mkdir animal
mv dog cat -t animal/
cd ~/Documents
mkdir backup
cp -r animal ~/Documents/backup
mv animal/ animal.bkup
ls db-[1-3].tar.gz
rm cne*.pdf
Show full summary
Hide full summary
Want to create your own
Mind Maps
for
free
with GoConqr?
Learn more
.
Similar
103.3 Perform basic file management
Rolando Martinez
101-500
Victor Santillan
OCR Biology AS level (f211) flashcards/revision notes
Dariush Zarrabi
FREQUENCY TABLES: MODE, MEDIAN AND MEAN
Elliot O'Leary
Quick tips to improve your Exam Preparation
James Timpson
Main Themes in Romeo and Juliet
Carlowl
League of Nations
c7jeremy
Maths
xcathyx99
AQA GCSE Chemistry Unit 2
Gabi Germain
Plant and animal cells
Tyra Peters
Macbeth Essay Notes
Mel M
Browse Library