Shared Flashcard Set

Details

Unix Bash Shell
Unix Bash Shell
35
Computer Science
Professional
10/25/2012

Additional Computer Science Flashcards

 


 

Cards

Term
cat
Definition
Concatenate files and print to console
Term
cmp file1 file2
Definition
compare two files, byte by byte
Term
cut
Definition
cuts a portion from each line of a file
cut -c2 filename gets the second character
cut -d "," -f2 uses , as delimiter, gets second field
Term
diff file1 file2
Definition
compares two files, line by line
Term
echo hello
Definition
writes "hello" to console
Term
grep filename
Definition
searchs for strings or regular expressions in file
Term
head -10 filename
Definition
gets the first ten lines of a file
Term
less
Definition
lets you scroll backwards and forwards through a file
Term
more
Definition
lets you scroll forwards and backwards through a file, the same as less
Term
sort filename
Definition
sorts the file
Term
sort -t"," -k2 filename
Definition
using , as a delimeter, sort the file by the second field
Term
tail -10 filename
Definition
lists the last ten lines of the file
Term
tr "text" "other text"
Definition
translate - swaps any instance of the first text for the second text in all text passed through it.
Term
tr [:lower:] [:upper:]
Definition
traslates lower case to upper case all letters passed through it.
Term
tr -d [:digit:]
Definition
deletes all nummbers passed through it
Term
wc -l filename
wc -c filename
wc -w filename
Definition
counts lines, characters, or words in a file or input stream.
Term
cd
Definition
change directory
Term
cd ..
Definition
go to parent directory
Term
chmod
Definition
change permissions on file
Term
chown
Definition
change owner of file
Term
dirname
Definition
returns the path of a file
Term
du
Definition
lists directories and how many blocks of disk space they use.
Term
cp
Definition
copies files or directories.
Term
find
Definition
find files or directories.
Term
ln filename linkname
Definition
creates a hard link to the file. The file names actually refer to the same physical data location, and remain when files are moved.
Term
ln -s filename linkname
Definition
creates a soft link - a reference pointer to the file.
Term
ls
Definition
lists all files in a directory.
Term
mkdir
Definition
creates a directory.
Term
mv
Definition
moves or renames a file.
Term
pwd
Definition
prints working directory.
Term
rm
Definition
deletes a file
Term
rmdir
Definition
deletes a directory
Term
stat -c%i filename
Definition
returns the node number of a file.
Term
touch
Definition
creates an empty file
Term
tree
Definition
displays the directories and files in a tree structure.
Supporting users have an ad free experience!