Contents of my dir are
$ ls -lrt
total 0
-rw-r--r-- 1 user1 admin 19 Oct 8 12:31 night.txt
-rw-r--r-- 1 user1 admin 19 Oct 8 12:31 noon.txt
-rw-r--r-- 1 user1 admin 38 Oct 8 12:31 day.txt
I would like to list out details of files that have a word in the filename as specified.
Example :
$ ls -lrt *day|night*
ls: *day: No such file or directory
bash: night.txt: command not found
Expected
Hello guys,
please help me to make simple script for parsing passwd file.
I have many passwd files from our servers, named server1.pass, server2.pass etc..
so
for server in `ls *.pass`
i need to print these rows:
server1;root:!:0:0::/root:/usr/bin/ksh
server1;user1:!:10166:10010:Admin:/home/user1:/bin/ksh
server1;user2:!:10167:10010:Admin:/home/user1:/bin/ksh
server2;user1:!:10168:10010:Admin:/h
I know a little about users and groups; in the past I might have had a group like 'DBAS' or 'ADMINS' and I'd add individual users to each group...
But I was surprised to learn I could add users to other users - as if they were groups.
For example if my /etc/group contained the following:
user1:x:12501:
user2:x:12502:user1
admin:x:123:user2,jim,bob
Since user2 is a member of the admin group, a
One of my users (user1) is able to connect to myserver (as user1) using SSH key authentication. The id_rsa keys are set up in /home/user1/.ssh and this works fine: the key is authorized on the server.
I've created a second user on the same client machine (user2) and copied the entire .ssh directory into /home/user2/.ssh.
Hi everyone,
I am trying to join two files together based on a field present in both files but not necessarily in the same order.
File 1:
123 user1
245 user2
559 user3
File 2:
123 user1
246 user4
544 user2
Also, sometimes a user may not even be in both files.
I am new to this shell scripting....
I have a file which contains list of users. This files get updated when new user comes into the system.
I want to create script which will give a table containing unique list of users.
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
[The thing is , here we have a number of employees working in root permission.!!! And we are not actually getting who is doing which command and all...]
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a.
I'd like to generate several separate lists for each user in Ubuntu.
Dear all,
i have two users user1 and user2 i want force user1 to login first by user2 and then su - user1
i want to prevent logging user1 from console directly