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

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

Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.
Subscribe Here (or)

Leave a Reply

Your email address will not be published. Required fields are marked *

six × = 42

Popup Dialog Box Powered By :
  • RSS
  • Facebook
  • Google+
  • Twitter