Linux Interview Questions and Answers – Part 4
1. how to create a file ?
using this command create a file in linux
Cat > sample.txt
Touch (this command using to create empty files)
2. how to create a directory ?
mkdir – to create a directory
3. How to create a directory to subdirectory using single command?
mkdir –p /linux/root/sample
4. How to create hidden directory and file ?
5. How to check the directory permission?
ls –ld command using to check directory permission
6. How to check the file format?
Mount these command using to check file format
7. How to check the directory contents ?
8. How to copy the directory ?
cp -r source to destination
9. How to copy the files with intractive option?
Ans: cp –i source to destination
10. How to move the file and directory?
mv source to destination