Linux Interview Questions and Answers – Part 4
1. how to create a file ?
using this command create a file in linux
Cat > sample.txt
Vi 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 ?
touch .sample.txt
Mkdir .sample
5. How to check the directory permission?
ls –ld command using to check directory permission
6. How to check the file format?
df –T
Mount these command using to check file format
7. How to check the directory contents ?
ls –l
Find
locate
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
Related Posts:
Subscribe Here (or)
Leave a Reply