0% found this document useful (0 votes)
10 views3 pages

EX1

The document provides an overview of important Linux directories and commands, including file management and navigation commands in Emacs. It details how to use Emacs for file operations and text manipulation. Additionally, it includes personal information of a student from Hanoi University of Science and Technology.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

EX1

The document provides an overview of important Linux directories and commands, including file management and navigation commands in Emacs. It details how to use Emacs for file operations and text manipulation. Additionally, it includes personal information of a student from Hanoi University of Science and Technology.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EX1

Important Directories and Files

• The root - /

/root – Home directory for root

/boot – static files of the boot loader

/bin – files needed to boot the system

/sbin – /usr/sbin system admin. utilities

/dev – device files

/etc – admin. and configuration files

Some Linux Commands

• ls: Lists the directory contents: Liệt kê nội dung thư mục

• pwd: Show current working directory: Hiển thị thư mục làm việc hiện tại

• cd: Change working directory: Thay đổi thư mục làm việc

• mkdir : Make directories: Tạo thư mục

• cp : Copy files and directories: Sao chép tập tin và thư mục

• cat: view the content of a file: Xem nội dung của file

• mv : Move / rename files.

• man: Display on-line manual pages: Hiển thị các trang hướng dẫn trực
tuyến

• which: print the directory contain the command: In các thư mục chứa lệnh

which gcc

Emacs Commands

• Emacs uses Control and Escape (or Alt) characters to distinguish editor
commands from text to be inserted in the buffer.

– Control-x means to hold down the control key, and type the letter x. (You
don't need to capitalize the x, or any other control character)

– [ESCAPE] x means to press the escape key down, release it, and then type
x.
– Abreviation: C-x for Ctrl-X and M-x means Meta-x

Emacs commands for a file

• Find and open a file

– C-x C-f file_name

– You can use TAB key to view the list of file in current directory

– When you tape a character, all files whose name start with this character
will be displayed.

• Save a file as you are working on it, type:

– C-x C-s

• Exit emacs: C-x C-c

Moving Around

• The arrow keys on the keyboard work for moving around one line or one
character at a time.

• Some navigation commands:

• Move to the Top of the file: M-<

• Move to the End of the file: M->

• Next screen (page down): C-v

• Previous screen (page up): M-v

• Start of the current line: C-a

• End of the current line: C-e

• Forward one word: M-f

• Backward one word: M-b

Cut, Copy, and Paste

• You can delete or move blocks of text.

– First move the cursor to the beginning (or end) of the block of text.

– Then set a mark with: C-spacebar

– Now move to the other end of the block of text and Delete or Copy the
block:
• Delete: C-w

• Copy: M-w

– To Paste a copied block, move to the new location and insert with : C-y

Another userful commands

• C-g: keyboard-quit (stop a comman which is taking too long)

• C-x 1 One window (i.e., show only one window)

• C-x 2 Splits the screen into two windows

• C-x o Move the cursor to the bottom window.

• C-x b Switch to buffer

• C-s search a string

EX3

_____ ĐẠI HỌC BÁCH KHOA HÀ NỘI

| | HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY

_____

__________________________________________________

_____________ Họ tên / Name

| | TRẦN THU PHƯƠNG

| | Ngày sinh / D.O.B

| | 06/08/2005

| | Trường Công nghệ Thông tin và Truyền thông

| | IT-E6: Công nghệ Thông tin Việt - Nhật – K68

_____________ Information Tecnology (Hedspi Program)

MSSV / ID No. Giá trị đến / Valid Until

20235811 30/07/2027

You might also like