In Linux everything are kept in form of files so accessing and managing them becomes a critical part as Linux user.
Following command is used to create a blank file or update the time stamp of any current file. As you see below we created a new file with name as a1 and than updated its time stamp with touch command itself.
[root@localhost ravi]# touch a1
[root@localhost ravi]# ls -l a1
-rw-r--r-- 1 root root 0 Nov 9 01:57 a1
[root@localhost ravi]# touch a1
[root@localhost ravi]# ls -l a1
-rw-r--r-- 1 root root 0 Nov 9 01:58 a1
Following command is used to copy files and directories in Linux.
[root@localhost ravi]# cp a1 b1
[root@localhost ravi]# ls
a1 b1
[root@localhost ravi]# ls -l
total 8
-rw-r--r-- 1 root root 0 Nov 9 01:58 a1
-rw-r--r-- 1 root root 0 Nov 9 02:03 b1
Following command is used to create the directory in Linux.
[root@localhost ravi]# mkdir dir1
[root@localhost ravi]# ls
a1 b1 dir1
[root@localhost ravi]# cd dir1/
[root@localhost dir1]# ls
[root@localhost dir1]#
Following command is used to delete the files and folder in Linux. rm command is used to delete both directories and file. rmdir is a specific command to delete the directories. rm with -rf is used to delete files or folder recursively and forcefully.
[root@localhost ravi]# ls
a1 b1 dir1
[root@localhost ravi]# rmdir dir1/
[root@localhost ravi]# ls
a1 b1
[root@localhost ravi]# rm a1
rm: remove regular empty file `a1'? y
[root@localhost ravi]# rm -rf b1
[root@localhost ravi]# ls
[root@localhost ravi]#
Following command is used to move or rename the files or directories in Linux.
[root@localhost ravi]# ls -l
total 12
-rw-r--r-- 1 root root 0 Nov 9 02:31 a1
drwxr-xr-x 2 root root 4096 Nov 9 02:32 dir1
[root@localhost ravi]# mv a1 b1
[root@localhost ravi]# ls
b1 dir1
[root@localhost ravi]# mv dir1 dir2
[root@localhost ravi]# ls
b1 dir2