Restart Server:
shutdown -r nowWhat's running:
ps auxWhat using up disk space
du -k | sort -rn | head -20Check for latest package:
rpm -qa | grep "mysql"To replace all instances of oranges with bananas in the file mytext.txt
sed -e 's/oranges/bananas/g' mytext.txtThis will display the file with changes. I havn't found a way of making the changes in situ, but to write the output to a new file:
sed -e 's/oranges/bananas/g' mytext.txt > newfile.txt20 most recently updated files:
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r | head -20What's using memory
topValue of environment variables set
exportList of all files recursively, containing text
grep -lir "no todo" *




4 comments:
try
sed 's /word/new-word/' my text
the -e option informs sed that more than one set of editing instructions is to follow:
sed -e 's/Veg/VEG/' -e 's/Meat/MEAT/' mytext
I don't think the mytext > mytextcopy is necessary, but you might try a further mytext < mytextcopy to see what happens.
no gaps between
sed 's/word/new-word/' mytext
thanks
Delete all .svn directories recursively:
rm -rf `find . -name .svn`
Post a Comment