Search Results

Search: Posts Made By: Ikon
18,310
Posted By Ikon
man cp # cp -Rp {olddir} {newdir} ...
man cp


# cp -Rp {olddir} {newdir}


This will copy all files and folders under {olddir}

-R = Recursive
-p = Preserve ownership (you probably want that too)
5,257
Posted By Ikon
sed 's/ *| */,/g' file or a shortened...
sed 's/ *| */,/g' file


or a shortened version of bartus11's

perl -pe 's/ *\| */,/g' file
2,867
Posted By Ikon
w -uh | grep -om 3 '^\S*'
w -uh | grep -om 3 '^\S*'
2,867
Posted By Ikon
w -sh | awk 'NR < 3 { print $1 }'
w -sh | awk 'NR < 3 { print $1 }'
3,670
Posted By Ikon
a="a1;b1;c1;d11;e1"; echo $1 | sed...
a="a1;b1;c1;d11;e1"; echo $1 | sed 's/[a-z0-9]*;/;/4'
2,562
Posted By Ikon
Try this: awk '!/\.$/{sub(/$/,...
Try this:

awk '!/\.$/{sub(/$/, ".")};{print}' myfile.txt


EDIT:
Hmm, didnt see the comma, sorry.

EDIT:
This works..

awk 'sub(/,$/, "") || !/\.$/{sub(/$/, ".")};{print}' myfile.txt
Forum: HP-UX 07-23-2010
17,305
Posted By Ikon
According to: Authentication refused: bad...
According to: Authentication refused: bad ownership or modes for directory /home

this is where your problem is, it gives that error when the permissions of home are to relaxed. Set it to what I...
3,657
Posted By Ikon
Hope this is not a class assignment. This is...
Hope this is not a class assignment.

This is not 100% but you should be able to figure out the fix.


awk '{ if(($2 > 0) && ($2 < 5)) { print $1" "$2}}' yourdatafile.txt
3,303
Posted By Ikon
I think if you restart syslog it will start...
I think if you restart syslog it will start working.

On my CentOS the command is:


# service syslog restart


Dont know what system you are using.
Showing results 1 to 9 of 9

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