03112014 Flashcards Preview

LPIC > 03112014 > Flashcards

Flashcards in 03112014 Deck (7)
Loading flashcards...
0

A file can be copied from another location to the current directory

Example:
1. Create "somefile" in /tmp and copy to your current directory

2. Copy bash file from /bin to /tmp

cp /tmp/somefile

cp /bin/bash /tmp

1

Search for files in a directory hierarchy

find

cd /usr
find -name bash
find -name bash*
find -name bin

2

Find files by name

locate

3

The ____ command uses the updatedb database to find files or directories on the entire system

locate

locate gnome-terminal
locate vim
locate ifconfig
locate -i sudo


4

CREATING TEXT FILES -VIM


cd /tmp
vim lbookfile1.txt
Press A
Type some words
Esc to get out Insert Mode
Press : to enter command mode
w to save file
wq to save and quit vim

5

CREATING TEXT FILES -EMACS



cd /tmp
emacs -nw lbooktest3.txt
type a few lines
Ctrl C and then ctrl S
Ctrl H for help
Ctrl x

6

Determine file type

file

# A binary file is what the computer "reads" (e.g. vim is a binary file)

cd /tmp
ls > temp.txt
file temp.txt
file /bin/bash