Một số lệnh thông dụng trong linux

1. Xóa toàn bộ các file .svn
  find . -name .svn -print0 | xargs -0 rm -rf
2. Xử lý với các file và thư mục trong thư mục hiện hành.
Ví dụ: chmod riêng folder hoặc file

find . -type d -print0 |xargs -0 chmod 755
find . -type f -print0 |xargs -0 chmod 644
hoặc
find . -type d | xargs chmod 644

3. Forward port thông qua ssh
sudo ssh -L 3308:IPserver:3306   user@IPserver

4. Grep: get 10 lines After ,  get 10 lines Before
cat file.txt | grep -A10 "test" | wc -l
cat file.txt | grep -B10 "test" | wc -l

Còn nữa..

How to extract text on font color from a cell in Excel?

You have a data list with some red text in each cell in Excel as shown as below screenshot, and do you know how to extract the red text only? Now I will introduce a quick way to solve the puzzle that extracts text based on the font color from a cell in Excel.

Create Custom Functions in Excel 2007, 2010, 2013

1. Press Alt+F11 to open the Visual Basic Editor, and then click Insert, Module.




2. Write your function here
Such as here is the function to get Red text in a Cell. It's very useful :)

Function GetRedText(pRange As Range) As String
   
    Dim xOut As String
    Dim xValue As String
    Dim i As Long
    xValue = pRange.Text

    For i = 1 To VBA.Len(xValue)

        If pRange.Characters(i, 1).Font.Color = vbRed Then
            xOut = xOut & VBA.Mid(xValue, i, 1)
        End If

    Next

    GetRedText = xOut
End Function