03112014 Flashcards
0
Q
Search for files in a directory hierarchy
A
find
cd /usr
find -name bash
find -name bash*
find -name bin
1
Q
A file can be copied from another location to the current directory
Example:
1. Create “somefile” in /tmp and copy to your current directory
- Copy bash file from /bin to /tmp
A
cp /tmp/somefile
cp /bin/bash /tmp
2
Q
Find files by name
A
locate
3
Q
The ____ command uses the updatedb database to find files or directories on the entire system
A
locate
locate gnome-terminal
locate vim
locate ifconfig
locate -i sudo
4
Q
CREATING TEXT FILES -VIM
A
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
Q
CREATING TEXT FILES -EMACS
A
cd /tmp emacs -nw lbooktest3.txt type a few lines Ctrl C and then ctrl S Ctrl H for help Ctrl x
6
Q
Determine file type
A
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