Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Unix commands
Mkdir <direcory name>: To create directory. We can create more no. of directories at a time. Ex: mkdir abc xyz pqr creates 3 diff. directories. rmdir <direcory name>: To remove directory. Cd <path>: To change into particular directory by specifying its path.
Mv <dir1> <dir2>: to move dir1 directory under dir2. If <dir1> not exists it creates new directory with name dir1 and move dir1 directory under dir2. If <dir2> not exists then total contents moved to dir2 and dir1 will be collapsed. If both dir.s not exists then dir1 will be created under dir2.
cp command
cp command:- This command is used to copy the contents of one file into another file. Ex1:-$cp test test2 This will copy the contents of test into a file test2.If test2 does not exist,it will be created.However,if it does exist,Unix takes the liberty to overwrite it without warning you.
cp command cont..
Ex2:- $cp test test2 josh_dir In the above command,all files mentioned are copied to the indicated directory.Provided that the directory josh_dir exists,both files test and test2 would be copied to it.
Rm command
rm command:- This command is used to remove the specified file or directory. Ex1:-$rm -I filename The above command is used to remove the given file.i.e you are asked for confirmation before deleting the file. Ex2:-$rm r directoryname This command recursively (-r) removes all contents of the specified directory and also specified directory itself. Ex3:-$rm f file This command would delete files forcibly. Ex4:-$rm a*.c The above removes all files with extension c and whose filename starts with a file.
mv command
mv command:- This command is used to rename the Ex1:- $mv sample josh Ex2:- $mv *.c /tmp The above command is used to move all files with extension c in current directory to /tmp directory. Ex3:-$mv /bin/* /tmp The above command is used to move all files of /bin directory to /tmp.
Weight 4 2 1
-rwxrwxrwx sample
-rw-r-xr-- 1
THANK YOU!!!