Restart Server:
shutdown -r now
What's running:
ps aux
What using up disk space
du -k | sort -rn | head -20
Check 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.txt
This 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.txt
20 most recently updated files:
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r | head -20
What's using memory
top
Value of environment variables set
export
List 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