Tuesday, July 21, 2020

Working with Linux CLI #2


Working with Linux Command Line Interface #2
https://msslinux.blogspot.com/2020/07/working-with-linux-cli-2.html

Login: student
 pass: ******

 [student@hostX Desktop]$ su
  Password: ******

 [root@hostX ~]# exit
 [student@hostX ~]$ exit

Linux Command Syntax/Pattern/structure:
===============================

Ideally every command has three parts. At first Command which is mandatory and last one is argument. Some commands works without arguments and for some commands arguments are mandatory. There is another part found for some commands tat is options.

  # command [optoin (-)] argument

 ex # ping -c 6 172.25.10.135   //'ping'(command) '-c 6'(option) '172.25.10.135' (argument)
    # date  //no option no argument
    # cal


[student@hostX Desktop]$ cd
[student@hostX ~]$ ls      ;list of files and dir.
[student@hostX ~]$ ls -l
[student@hostX ~]$ ls -li  ; Files and directory inode
[student@hostX ~]$ ls -la  ; details list with hidden files and dir
[student@hostX ~]$ ls -lh  ; human readable
[student@hostX ~]$ ls -laih ; all


here let's discus about different options of 'ls' command:

 -l = list  (to show long and details list as option)
 -i = inode (unique indexing number for every file)
 -a = all   (will show all files including hidden files of current directory )
 -h = human readble (will show file size in Kilo, Mega, Giga instead of bytes)


Continued in next post Working with Linux CLI #3

No comments:

Post a Comment

Working with Linux CLI #2

Working with Linux Command Line Interface #2 https://msslinux.blogspot.com/2020/07/working-with-linux-cli-2.html Login: student  pass:...