command: cat



f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,363
Reaction score
4,835
Credits
46,772
cat command examples:

show the contents of /etc/passwd while searching for the user 'rob'
Code:
[root@server ~]# cat /etc/passwd|grep rob
rob:x:500:500::/home/rob:/bin/bash
Isn't that doing an unnecessary cat, you can just do it like this?
Code:
[root@server ~]# grep rob /etc/passwd
rob:x:500:500::/home/rob:/bin/bash
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
9,127
Reaction score
8,089
Credits
39,062

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,363
Reaction score
4,835
Credits
46,772

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,910
Reaction score
1,972
Credits
18,114
i think it means rob has user id of 500 (uid) and group id (gid) of 500
 

Staff online

Members online


Top