Experiment No: IT18111 Programming For Problem Solving Lab
Date :
Experiment – 1 Basic linx commands
Aim : To practice of Linx commands
1 . command:mkdir
Description: creating a new directory
Usage: mkdir dirname
Example: mkdir ITA
Output:$ mkdir ITA
$ ls
$ ITA
2 . command:ls
Description: To list all files and directory
Usage: ls
Example: $ ls
Output: ITA
3. command:cd
Description: To change directory
Syntax: cd dirname
Usage: $ cd ITB
Output: ITB$
Register No :2127230301019 Page No :
4. command:cd
Description: to come out of that directory
Syntax: cd ..
Usage: $ cd ..
Output: ~$.
5. command: cat>
Description: To create a new file
Syntax: cat> filename.txt
Usage: cat > sample.txt
Output:Hello
^z
+stopped
6. command: cat
Description : To display the content of file
Syntax: cat filename.txt
Usage: cat sample.txt
Output: Hello
7. command: cat>>
Description : To append content to existing file
Syntax: cat>> filename.txt
Usage: cat>> sample.txt
Output: we are from ITA
^z
+stopped
Register No :2127230301019 Page No :
8. command:cp
Description: To copy content from one file to another within the same directory.
Syntax: cp oldfile.txt newfile.txt
Usage: cp sample.txt file1.txt
Output: sample.txt file1.txt
9. command:mv
Description :To move file from one directory to another
Syntax : mv source div / newfile name.txt
Usage: $ mv ITA / into.txt
$ cd ITA
$ ls
Output: into.txt
10. command: rm
Description: To remove file from directory
Syntax: $ rm file1.txt
$ ls
Output: sample.txt
11. command: rmdir
Description: To remove a directory
Syntax: rmdir ITA
ls
output: ITA
Register No :2127230301019 Page No :
12. command: vi
Description: It is a command line, an interactive editor that can be used to create and edit file
Syntax: vi filename.c
Usage: vi file1.c
Output:
13. command:Esc:wq
Description:It is command line,that is used to save the c file created
Syntax:Esc:wq
14. command:cc
Description: It is a command line, that is used to compile and run a program
Syntax: $ cc sample.c
15. command: ./a.out
Description; It is command line,that is used to display the output.
Syntax: $ ./a.out
Register No :2127230301019 Page No :