0% found this document useful (0 votes)
41 views

Command Description Example: Mkdir

The document describes common Linux commands for navigating and manipulating directories and files including mkdir, pwd, cd, cp, rmdir, rm, and grep. It provides the command syntax and examples of using each command.

Uploaded by

kevin
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Command Description Example: Mkdir

The document describes common Linux commands for navigating and manipulating directories and files including mkdir, pwd, cd, cp, rmdir, rm, and grep. It provides the command syntax and examples of using each command.

Uploaded by

kevin
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

Command Description Example

Make directory
mkdir <name> $ mkdir foo
with name

Print working
pwd $ pwd
directory

cd <dir> Change to <dir> $ cd foo/

cd relative to
cd ~/<dir> $ cd ~/foo/
home

Change to home
cd $ cd
directory

Change to
$ cd && pwd
cd - previous && cd -
directory

The current $ cp
.
directory ~/foo.txt .

.. One directory up $ cd ..

find Find files & $ find .


directories -name foo*.*

$ cp -r ~/foo
cp -r <old> <new> Copy recursively .

Remove (empty)
rmdir <dir> $ rmdir foo/
dir

Remove dir &


rm -rf <dir> $ rm -rf foo/
contents

Grep recursively
grep -ri <string> $ grep -ri
(case- foo bar/
<dir>
insensitive)

You might also like