Skip to content

Latest commit

 

History

History
72 lines (63 loc) · 1.14 KB

09-manage-files-directories.md

File metadata and controls

72 lines (63 loc) · 1.14 KB

Manage Files and Directories

How to Manage Files and Folders on Raspberry Pi 3 Model B+

Create Directory


pi@raspberry:~ $ sudo mkdir NEW-DIRECTORY-NAME

Change Directory


pi@raspberry:~ $ cd DIRECTORY-NAME
pi@raspberry:~ $ cd ..
pi@raspberry:~ $ cd ~/

Rename File or Directory


pi@raspberry:~ $ sudo mv OLD-DIRECTORY-NAME NEW-DIRECTORY-NAME
pi@raspberry:~ $ sudo mv OLD-FILE-NAME.EXT NEW-FILE-NAME.EXT

Copy/Rename File or Directory


pi@raspberry:~ $ sudo cp OLD-DIRECTORY-NAME NEW-DIRECTORY-NAME
pi@raspberry:~ $ sudo cp OLD-FILE-NAME.EXT NEW-FILE-NAME.EXT

Create File


pi@raspberry:~ $ sudo touch FILE-NAME.EXT
pi@raspberry:~ $ sudo nano FILE-NAME.EXT

Edit File


pi@raspberry:~ $ sudo nano FILE-NAME.EXT

Find File


pi@raspberry:~ $ sudo find / -name 'FILENAME.EXT'

Delete File or Directory


pi@raspberry:~ $ sudo rm -rf DIRECTORY-NAME/
pi@raspberry:~ $ sudo rm -rf FILE-NAME.EXT