file.txt contains:
white
green
blue
foo
red
black
bar
yellow
Hope this helps!!! Read more ...
sed '/foo/,/bar/{d;}' file.txt
Output:white
green
blue
red
black
yellow
my views
file.txt contains:
white
green
blue
foo
red
black
bar
yellow
Hope this helps!!! Read more ...
sed '/foo/,/bar/{d;}' file.txt
Output:white
green
blue
red
black
yellow
I had a situation where I had to find and replace in files with out creating new files and renaming them back, so after some research on Google I came up with this:
find . type –f | xargs perl –pi –e 's/foo/bar/g'
find . -type f | xargs grep foo
-i for ignore case Read more ...
find /usr/home/akt -type f | xargs grep -i foo
SELECT HASHAMP ( );
SELECT HASHAMP ( ) + 1;
filename.out contains:
abc def ;
ghi jkl ;
asd fgh ;
awk '{print $2 "="}' < filename.out
Output:
def=
jkl=
fgh=
Space Terminology
Perm | Spool | Temp | |
Max | The maximum number of bytes available for table, index and permanent journal storage in a database or user | A value used to limit the number of bytes the system will consume to create spool files for a user | A value used to limit the number of bytes the system will use to store data for global temporary tables for a user |
Current | The total number of bytes in use to store the tables, subtables, and permanent journals contained in the database or user | The number of bytes currently in use for running transactions | The number of bytes in use for global temporary tables |
Peak | The largest number of bytes actually used to store data in this user since the value was last reset | The maximum number of bytes used by a transaction run for this user since the value was last reset | The maximum number of bytes used by global temporary tables for a user since the value was last reset |
Space Limits:
Example of space terminology:
Lets say we have a user HR with MaxPerm space 25 MB, MaxSpool space 50 MB and MaxTemp space 30 MB. Now HR creates two users HR01 and HR02 with 6 MB, 4 MB MaxPerm space respectively and assigning 35 MB MaxSpool space to HR01, as there is spool assigned to HR02, it spool space defaults to its immediate parent MaxSpool space i.e. 50 MB. Now HR is left with 15 MB of MaxPerm space. Later HR drops HR01, HR MaxPerm space increases to 21 MB, since it regains Perm space fro HR01. As there is no MaxTemp space assigned to HR01 and HR02 it is defaulted to their immediate parent to 30 MB.
Giving one user to another: