Sunday, October 15, 2017

Basic Command Line in Linux


mkdir [make directory]
rm -r diretoryname [remove directory]
mv directory1/sample.txt directory2/sample.txt [to move file in another directory]
cp directory1/sample.txt directory2/ [to copy file in another directory]
rm directory/sample.txt [to delete file in directory]

Create file
cat > sample.txt [to create content file]
type sample text file
another line text.
Ctrl+D [to exit file once done editing]
ls -l sample.txt [to verify edited file]
cat sample.txt [to view file content]
> sample.txt [to create blank content file]
touch sample.txt [to create blank content file]
vi sample.txt [to add text in the file]
Esc then :wq [close vi and save file]



#Tags
#linux, #linuxcommands, #basiclinux, #basiclinuxcommands, #unix

No comments:

Post a Comment