On this tutorial, you will learn the basic commands in Linux CLI specially for those who are new in Linux.
ls - display all files in the directory.
ls -l - display file(s) with details,such as permission,owner of the file,date and time created,etc.
cd - similar in DOS command. Change the directory you are working
pwd- (present working directory) Check on what directory your are currently in.
cp- copy file from one directory to other or sa
rm- same as del in DOS command. Type rm followed by the filename you wish to delete . You can use rm -f(force) to delete the file without asking confirmation.This is advantage specially you are deleting more files. Type rm -r to delete the entire folder. To delete multiple files with common extension type rm -f *.(txt,zip etc)
mv- same as move in DOS command. Type mv file1(source) /dir(destination). There's no renaming command in linux CLI but you can rename by using this command, mv file1 file2(same or other directory) then the source file will be deleted
mkdir- create new directory. Type mkdir newdirectory.
rmdir - delete a directory. Type rmdir existingdirectory.
man- display information of a linux command. Type the command man followed the by linux command you wish to know more about the use of that command.
Ex: show all information about cat
more- same way as cat but it will display the file content per page by hitting the space and per line by hitting the Enter button.
less- more useful than cat and more command. The same way with more but you can scroll up and down the content by hitting arrows and space bar.
No comments:
Post a Comment