List of Unix/Linux File Commands

  List of Unix/Linux File commands. There are some File handling commands shown below.
List Of Unix/Linux Commands
List Of Unix/Linux Commands

List of file command for Unix/Linux

Table of Contents

SN Commands Descriptions
1. ls It will show you the list of files and directories.
2. ls -al Shows the formatted listing directories and hidden files.
3. cd dir cd command is used to change the directory
4. cd It changes the directory to the home or /
5. pwd pwd command returns the current working directory
6. mkdir new_folder This command will help to create a new directory
7. cat > new_file cat command create a file or place the input into the files
8. more my_file It returns or shows the contents of files.
9. head my_file Return the first 10 lines from the file
10. tail my_file Return the last 10 lines from the file
11. tail -f my_file Return only last 10 lines of file even the line grows.
12. touch file Create or update the file
13. rm my_file rm command is used to delete the file
14. rm -r my_dir Use to remove the directory
15. rm -f my_file Force to remove the file, even file in use
16. rm -rf my_dir Force to remove the directory
17. cp file1 file2 cp command copy the contents of file1 to file2
18. cp -r dir1 dir2 Copy the dir1 to dir2, if dir2 is not present it will create it.
19. mv myfile1 myfile2 Rename or move the myfil1 to myfile2, if file2 is an existing directory it will rename it.
20. ln -s file link Create a symbolic link to file(create a shortcut)

Leave a Reply

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