Search Results

Search: Posts Made By: invinzin21
4,974
Posted By invinzin21
Add user based on file
The script it should add all the users from this file "users.txt" All users should have the login shell as /sbin/nologin. When this script is called with any other argument, it should print the...
2,401
Posted By invinzin21
Calculate the average per block.
My old school way is a one liner. And will search for average from SAR, to get the data receive rate. But, I dont think it is practical or accurate,. Because it calculates to off peak hours. I am...
4,496
Posted By invinzin21
sed or awk grep, that will only get the line with more characters.
Is there a command for sed and awk that will only sort the line with more characters?


#cat file
123
12345
12
asdgjljhhho
bac
ss

Output:
asdgjljhhho


#cat file2
11.2
12345.00...
3,224
Posted By invinzin21
It did not give me the owner. comp2 ...
It did not give me the owner.

comp2
/root/.ssh/id_rsa

comp1
/root/.ssh/id_rsa
3,224
Posted By invinzin21
names can be anyone. rhel is the OS.
names can be anyone. rhel is the OS.
3,224
Posted By invinzin21
Run a loop that will search for a file to thousand machine and know who owns the file
Run a loop that will search for a file to thousand machine and know who owns the file


[user@adm:~]$ for i in abc{01..02}
> do
> echo -n $i
> ssh $i "sudo find / -name .ssh -exec ls -l {}...
2,043
Posted By invinzin21
the viebinary could be the string command or any...
the viebinary could be the string command or any application command that can view a a binary file.
Thank you

--- Post updated at 09:57 PM ---

grep -e COM e -NET -e GOV # this is what im...
2,043
Posted By invinzin21
I guess this is an else statement? I need help...
I guess this is an else statement? I need help here. I will have a find and a loop statement. That will look for a file that contains NET in the file and will move it to net directory. Same goes with...
2,043
Posted By invinzin21
Dig and concatenate all files yesterday then save it to another directory depends on the match
I dont want to use for loop since it is using a lot of resources especially to a thousand files. Wanting to have a while? or something will find files that has been modifed or created yesteraday....
2,312
Posted By invinzin21
Hi Neza, care to explain the solution,...
Hi Neza,
care to explain the solution, character by character?
Thank you

--- Post updated at 12:28 AM ---

HI Vgersh,
care to explain the solution, character by character?
Thank you

---...
2,312
Posted By invinzin21
If pattern match in other column, modify column 3.
My command sed will modify everything in column 3 if i will use the command below. I want to search for a pattern then modify everything in column 3.


sed -i 's/\|165\|/server1/g' file.txt


...
1,440
Posted By invinzin21
Else statement in looking for a character
I have list of hostnames with

# cat list
servdc01
servdc02
compdc01
compdc02
servit01
servit02
prindc01
datacenter01
dcenit01
dcendc01
[root]


If the hostname has dc in 5,6. Copy a...
965
Posted By invinzin21
For loop that will replace the ifcfg data.
Change IP to multiple servers based on a database file. Source ip file is not incremental.

# Source host
#cat hosts
server1
server2
server3
server4
server5
server6
# SOURCE file
#cat ip...
1,386
Posted By invinzin21
setup a passwordless authentication first
setup a passwordless authentication first
1,515
Posted By invinzin21
Automate or 1 line command for ssh-keygen -t rsa
I know there's an echo 1 liner command that will do a new line for me, I think same with fdisk too. Dont want to press "enter,enter,enter" just to finish the ssh-keygen -t rsa. Hope you understand...
2,372
Posted By invinzin21
that doesnt work i tried it. but thank you...
that doesnt work i tried it.
but thank you though.

---------- Post updated at 01:24 AM ---------- Previous update was at 01:20 AM ----------



It works.. Thank you so much
...
2,372
Posted By invinzin21
I want something like.. #cat list_of ...
I want something like..


#cat list_of
ajsdfjasldfjasdflkasdfasdfsdaf klasjfklas aa.exe skdfjasdkljf
slkadjfaskljfsdfmsdf aa.bin akljdajs
lkajskjnnn aaa sssss gggg 11111 bb.exe



# cat...
2,372
Posted By invinzin21
Replace my perl with awk or sed
My code below will print only the email address from all lines. I want to convert it with sed or awk.. also what if i just want to find only filenames.


cat LIS_EMAIL | perl...
1,656
Posted By invinzin21
Hi Drl, Can you please explain to me character...
Hi Drl,
Can you please explain to me character per character this command please?

perl -wpe 's/(:\d\d)([.]\d+\s\s?[+]\d+)/$1/'

Thanks

---------- Post updated at 10:00 PM ---------- Previous...
1,656
Posted By invinzin21
Thank you so much.. i appreciated it.. 1thanks...
Thank you so much.. i appreciated it.. 1thanks for you... but somehow im hoping for awk or sed..i just need a 1 line command..
1,656
Posted By invinzin21
Ommit the numbers or any characters only at 8th columns after the dot (.).
Ommit the numbers or any characters only at 7th or 8th columns after the dot (.) . Since the group column has 1 and 2 spaces.
Thanks



-rw-r--r--. 1 user1 domain users 619...
2,860
Posted By invinzin21
Agree....
Agree....
4,461
Posted By invinzin21
Ok thank you..maybe we close this ticket
Ok thank you..maybe we close this ticket
4,461
Posted By invinzin21
THIS IS CORRECT, -rw-r-----. 1 root domain...
THIS IS CORRECT,

-rw-r-----. 1 root domain users 81 Mar 7 15:51 aa
drwxrwxr-x. 13 root domain users 4096 Mar 8 14:25 development
drwxr-x---. 2 root domain users 4096 Mar...
4,461
Posted By invinzin21
What is wrong with 'find . -maxdepth 1 -ctime -7 -type f'?
Have you tried running the command below? On the same RHEl 6.8 or 6.6. It will give you different output.


find . -maxdepth 1 -ctime -7 -type f



rpm -qa|grep find...
Showing results 1 to 25 of 136

 
All times are GMT -4. The time now is 02:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy