Professional Documents
Culture Documents
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.
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: