You are on page 1of 6

OSY EXP 6

Program Code :
1. Create four files a1, a2, a3 and a4.

2. Apply different commands like ls, mv, cp, rm, join, split and check the list of files at the end.
- $ls
OSY EXP 6

- $mv

- $cp

- $rm

- $join
OSY EXP 6

- $split

- $ls -l
OSY EXP 6

XIII. Exercise:
1. Write output of following commands:
i) Display all file names which start with ‘a’ and ends with ’y’.

ii) Enlist all the files beginning with ‘m’ and ending with any range of 1 to 5.

iii) Show the contents of the files whose file names contains exactly two characters.
OSY EXP 6

iv) Create a file ABCD.txt, create a copy with XXXX.txt. Rename the original file with AACD.txt. Delete the file
XXXX.txt.

v) Display the inodes of any two files at the same time.

2. Create two files chapter1 and chapter2 by and perform the following operations.
a. Copy contents of chapter1 to chapter2 by asking the user before overwrite.
Output:

b. Display i nodes of two files.


Output:

c. Rename the file “chapter1” to “Lesson1”.


Output:

3. Execute the following commands:


a. $ls a*n
b. $ls s?
OSY EXP 6

c. $cat abc >>xz


Output:

You might also like