Linux Find Command

ExamplesCreated by @dan_nanni on Instagram

find . -name “my.txt” find all files named “my.txt”

find .-type d-name “mydir” find all directories named “mydir”

find . -type f-name “*.jpg” find all “.jpg” files

find . -type f-size +100M find all files larger than 100MB

find . -type f-size +100M-size -500M find files with a specific size range

find . -type f-mtime-1 find all files modified in last 24 hours

find .-mtime-7-mtime +1 find files modified betn yesterday & a week ago

find . -type f-name “*.tmp” -delete find and remove all “.tmp” files

find . -type f-perm 0777 find all files with “777” permission

find . -type f-perm-u+x find all files executed by the user

find . -type f-name “*.txt” -exec cat {} \; find and cat all “*.txt” files

find . -type f-amin-60 find all files accessed within the last hour

find . -type f-user dan find all files owned by the user “dan”

find .-type f-ctime -2 find files created within last 2 days

find .-maxdepth 1 -name “my.txt” search only in current dir

find . -type f-name “*.txt” | xargs chmod 644 chmod all “.txt” to 644

find . -type f-name “*.jpg” | xargs tar -cf img.tgz archive all “.jpg” files

find . -type f-name “*.png” | xargs -I {} mv {} /tmp move all “.png” files

find . -type f-name “*.txt” | xargs grep “Hello” search for Hello in “.txt”

find .-xtypel-delete find and remove all broken symbolic links

find .-type d-empty-delete find and remove all empty directories

find .-newermt “2024-01-01”! -newermt “2024-03-15” use a time range

做人要學會保護自己

  1. 你不讓他佔便宜,就是你自私。
  2. 你不接受他們的價值觀,就是你固執。
  3. 你不肯接受他們的指揮,就是你強勢。
  4. 你一旦站在道理上不肯退讓了,就是你態度問題。
  5. 你差到他們的陰謀時,你太敏感了。
  6. 他們一旦發現你沒有那麼好騙,就是你們不懂事。
  7. 你一旦要勝利了,他們發現了就要輸,你就是世界第一大反派。

別因為一時的成功,而得以忘形

別因為一時的成功,而得以忘形 ,隨便發表自己的個人想法,從而導致身邊的人感受不良好,不舒服。這會直接為自己造成重大影響,損害個人形象。我們必須要記住,沒有人喜歡聽另一個人講大道理,特別是這些道理他們不接受,為了自己,讓自己成為一個謙虛的人謙卑的人,就是保護自己最好的方法。 別忘記,當你成功時,同時代表人家失敗。人家為什麼要高興呢? 不喜歡人家過得比自己好,是很多人的內心世界,沒必要讓這些人不高興,以為自己造成傷害。再溝,只不過是一些少許的成就,有必要炫耀嗎?就算要炫耀,都必須要對自己有幫助下,才有意義,傷害自己毫無意義也可言。

避免無目的地開玩笑

為了顯得幽默風趣,有些人經常刻意地逗人開心,但這種行為往往會因思考速度不夠快而不慎冒犯他人,這些無意義的言論不僅傷害了別人,也傷害了自己。

我們需要認真思考一下,開玩笑是否具有必要性和重要性?除了讓對話變得有趣外,其餘的效果往往是負面的。

有一位女士曾經說過,如果說的話不好聽,不如不說,只說些正面的話語。這種做法對於自己和他人都是有益的。

讓我們來分析一下,拿別人的缺點開玩笑有意義嗎?還是用他人的優點來逗人開心更好一些?

通過思考,看來已經找到答案。

nextCloud upgrade hints

Use command line for upgrade nextCloud was bester than using Web Upgrade. Some reason not work with Web upgrade.

Using the command line for upgrading NextCloud is more efficient than using the web upgrade interface. There are several reasons why the command line method is preferable:

Upgrade Duration: Upgrading NextCloud can take several hours, and when using the web upgrade, it’s difficult to gauge whether the process is progressing or if it has encountered issues and halted.

Error Handling: Upgrades can sometimes result in errors that require intervention. When using the command line, it provides more detailed information about any issues encountered, making it easier to take corrective actions. In contrast, the web upgrade may not provide sufficient information to diagnose and fix problems effectively.

PHP Configuration: To upgrade NextCloud, PHP often requires the apc.enable_cli=1 configuration. This configuration may not always be set correctly when using the web upgrade, causing upgrade issues.

In summary, utilizing the command line for NextCloud upgrades offers better control, error visibility, and ensures the necessary PHP configurations are in place for a smoother upgrade process compared to the web upgrade interface.

Make the nextCloud Folder work with same User and same permission

My Web Directory: /var/www/nextcloud
My Apache user: apache2

chown -R apache2: /var/www/nextcloud

nextCloud Upgrade

sudo -u apache2 php --define apc.enable_cli=1 /var/www/nextcloud/updater/updater.phar

sudo -u apache2 php --define apc.enable_cli=1 /var/www/nextcloud/occ upgrade

sudo -u apache2  php --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:mode --off

The database is missing some indexes

sudo -u apache2  php --define apc.enable_cli=1 /var/www/nextcloud/occ db:add-missing-indices 


不要浪費時間在無關緊要的人身上

昨晚我做了一個奇怪的夢。在夢中,我感到自己即將離開這個世界,但不像一般的夢境,我不是躺在床上,而是自由自在地四處走動。我來到一個公共廁所,卻看到許多人毫無秩序,場面混亂。當時,我感到自己非常鎮定,就像在一場漫遊旅行中一樣,充滿輕鬆感。然後,突然間我停下來,思考了一下。我想,既然我即將離開這個世界,有什麼非常重要的事情我應該處理呢?

突然,我想起了我最愛的孫女、最愛的兒女、最愛的太太,以及我最愛的家人。那一刻,我心中只有一個念頭,那就是盡快見到我的家人,然後我才能夠安心離開這個世界。但是,當時我感到非常無奈,因為我無法立刻回到他們身邊。

突然,女兒打來電話,詢問我在哪裡,我才知道孫女和家人都在等著我。於是,我趕緊回到殯儀館,見到了他們最後一面。但在回去的途中,我又突然想去理髮,並與一名理髮師老闆聊了起來,情緒愉快。我竟然忘記了家人的重要性,即將面對最後一面,為什麼我會這樣呢?我真的在責備自己,覺得自己太過放縱,總是容易被無關緊要的事情吸引,最終卻後悔不已。

這個夢境讓我反思,在現實生活中,我經常因為過度放縱自己,忽略了重要的事情,最終感到後悔。我應該時刻提醒自己,最重要的是我的家人,我的至愛。我願意為了保護他們而奉獻一切,因此,無論何時,我都不應該再將時間浪費在無關緊要的事情上。即使死亡即將來臨,我也應該學會改變,珍惜每一刻,並注重真正重要的價值。

Battery Auto Charger Specification Design

An advanced four (seven) stage charging program is written inside the automatic charger. While the battery is fully charged, the service life of the battery can be effectively extended.

Soft start
At the moment when the charger is energized, the power is buffered from small to large, which has a buffering protection effect on the charger when it is started.

Constant current
At this stage, the charger outputs the rated current for fast charging to increase the charging rate. The voltage of the battery gradually increases. At the same time, in order to prevent the battery from being overcharged, the charging voltage of the charger is limited to a safe value range. When the charging voltage rises to the set value, the charging current will begin to decrease slowly. At this time, the charger enters the constant voltage charging stage and continues to replenish the battery.

Constant voltage
At this stage, the charging current of the charger will gradually decrease, which can reduce the heating and vaporization of the battery and effectively avoid premature damage to the battery due to excessive aging. When the battery capacity reaches approximately 90%, the indicator light will briefly turn orange and the charger will enter the top-off phase.

Float charge
At this stage, the charger only outputs a lower voltage and smaller current to charge the battery. In this way, 100% capacity of the battery can be guaranteed at any time, and the battery will not bear unnecessary burdens, so as to prolong the service life of the battery as much as possible. At this time, the indicator light is green, which means that the battery capacity is basically fully charged.

Basic Information

Input Voltage : 100 ~ 240Vac, Min. 90Vac, Max 265Vac

Target Battery Voltage : 12V Lead Acid Battery

Output Current: Max. 6A

Output Power: 72W

Operation temperature : -40°C, +85°C

Automatic function: Auto Start/Stop

Meter: Voltage, Amp Current

Output Protect: Output reverse connection protection

Input

Frequency: 47~63Hz

Efficiency: >85%

Leakage Rate: <3.5mA/240Vac

Surge Current: 12A/230Vac

AC Current: 0.36A/230Vac

Output

Open Circuit Voltage: 13.8Vdc

Max. Output Power: 72W

Max. Output Current: 6A

Recommend Battery capacity: 18~90Ah

Open Circuit power waste: <1.3W

Voltage ripple: ≤50mV

Voltage precision: ≤1%

Battery Leakage current: <30mA

Battery Class: Lead Acid Battery

Protect

Output overload protect: The charger will stop its output when the voltage exceeds or reaches ≥14Vdc, with the Red LED indicator turning ON. It will resume operation when the output voltage falls below 14Vdc.

Over current / Short circuit: Limited current

Temperature protect: When the ambient temperature exceeds 30°C, the charger’s rated output power will gradually decrease as the temperature rises. Once it exceeds 60°C, the charger will stop outputting power. When the temperature drops below the cutoff point, the charger will automatically restore normal output.

Cooling method: Nature cool

Function

Start mode: Soft start

Constant current: When the main battery voltage drops below ≤ 12.5Vdc, the charging output pressure is activated for fast charging to increase the charging rate. At this time, the indicator light(L) will illuminate in red

Constant voltage: When the charger’s output voltage reaches 13.9Vdc and remains relatively stable, the charging current gradually decreases. This helps reduce battery heating and vaporization, effectively preventing excessive aging and premature damage to the battery. At this time, the indicator light(L) will illuminate in red

Float charging: When the battery capacity reaches 90%, the charger enters the float charging stage to continue replenishing the battery. At this time, the indicator light (L) will in green.

Environment

Operation temperature: -20°C ~ +50°C

Storage temperature: -40°C ~ +85°C

Operating humidity: 20~90%Rh

Storage humidity: 0~95%Rh

Vibration resistance: 10~500Hz 2G 10 minutes/cycle, x/y/z axis 60 minutes

Auto start/stop control

Auto stop charge: When the changing voltage exceeds ≥13.8Vdc, the charging current will continue to gradually decrease. When the charging current drops below 0.6A, the charger will automatically stop outputting power.

Pulse charging: It is a timely replenishment control method for the natural consumption of the battery, which not only keeps the battery in the best working condition at all times. It can also minimize the vaporization of the battery and the sulfide corrosion reaction of the plates,
avoid early damage and aging of the battery, and effectively extend the service life of the battery. At this time, the indicator light (R) lights green intermittently.

Auto activate charging: When the battery voltage is ≤13.2Vdc , the charger will automatically activate and return to the corresponding charging state.

Alarm

Relay alarm: When the battery voltage is ≤12.5Vdc or when the charger fails to output, the relay contact is closed.

Indicator light alarm: When the output voltage of the charger is ≥14Vdc, the charger stops outputting, and the indicator light (R) is red at this time.

Reverse protection

When the charger’s output terminal is connected reversely, the charger stops output; when the reverse connection is removed, the charger will automatically resume output (when the battery voltage is higher than 5Vdc): If the battery voltage is lower than 5Vdc at this time, you need to protect it first.
When the power supply of the input terminal is confirmed to be normal, disconnect the output terminal and then connect the output terminal, the charger will automatically restore the output.

Q9 註冊 info

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CQ12EaXA
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RolAAs
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\q9vsb5r
Windows 7 Batch Files
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CQ12EaXA /v DXAT2 /t REG_SZ /d "0022446688;85;69%%!%%%%" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CQ12EaXA /v DXAT4 /t REG_SZ /d "0022446688::<?9?#%%'$" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CQ12EaXA /v DXAT1 /t REG_SZ /d "0022446688::986<'$#'" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\q9vsb5r /v skey /t REG_SZ /d "00000000001297875177" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\q9vsb5r /v ukey /t REG_SZ /d "00000000000003713556" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\q9vsb5r /v rkey /t REG_SZ /d "00000000000054827415" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RolAAs /v hdny /t REG_SZ /d "0020002080;21727%%1%%7" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RolAAs /v ohae /t REG_SZ /d "0020002080:083=1#5'6" /f >nul
@REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RolAAs /v hgq /t REG_SZ /d "0020002080:0=422'4#5" /f >nul

業績後才出手 先贏為敬 忌留戀過氣股皇

作者: 黃國英 (內容由Quamnet提供)

「凡治眾如治寡,分數是也。」《孫子兵法》

同事早前去聽施永青先生的管理講座。施生強調:治理眾人時,如何分配資源、權責、利潤,是公司做大做強的關鍵–一字記之曰「分」: 有利均霑、賞強罰弱,強者才甘心賣命;賞善罰惡,團隊方有紀律;責大利亦大、無不勞而獲,各人自會先公後私,眾志成城。同事嘆曰:「聽君一席話,勝讀十年書」,雖極老套,卻是感受至誠。

社會上,打工一族,遠多於老闆,沒機會「治眾」。但孫子「分數是也」精神,我等常人,偷用於投資,誰曰不宜?旁觀年青散戶,初入社會,人微本少,除非出自小康之家,繼承家人資本,不然單靠儲錢,資本增長受限。揸住十萬八萬,股票又多如繁星,隻隻似股王,間間有潛質,未諳股道,難辨真假。或隨波逐流,盲揸過氣股王,身家點穴;或月供廢基金,天價認購費,回報卻極曳,勞多而功少。

有一近例:同事家人,一年前被銀行力銷「高收益債券基金」,驚濤駭浪,歷遍債務危機,還幸大步檻過,由敗轉勝,扣除5%認購費,實贏3%。銀行職員,竟敢邀功,再游說轉入另一債券基金,新基金免認購費,但舊基金要收2%贖回費,等於分了2/3回報給銀行。苦苦投資一年,只得1%淨回報,跑輸安全到極的領匯(0823)廿條街。不少港人,日夜埋怨「地產霸產」加害,永無出頭,卻矇盛盛地將血汗錢,長年累月由「生錢」變「死錢」。財富不得積累壯大,真是命數使然,而非自招?

沿襲《孫子》精神:求勝,指揮能力,遠重於兵力多寡,不然古今沒有以寡勝眾之例。天縱英材,如巴菲特和索羅斯,莫不肇始於微。得第一桶金,關鍵在「分」:投生不投死,務使每分錢,皆為「生錢」錢搵錢。看通十年大勢,實強人所難;識股王於微時,亦誠非易事。最知易行不難之法,是業績公佈後,集中找出股價動力澎湃的股份,稍花時間跟進業績,每有意想不到的收獲。今年暢勝的理文(0746)、I.T.(0999)和星島(1105),皆是績後才出手。

出業績後,帳目了然,管理層又有指引(guidance),認真研究,又可約見,睇多隻牌,更為安全。股價當然貴了,但長線如仍有水位,價高值仍低,除笨實有精。安心買入,注碼可更大;股價又有動力,乘風破浪段段有。買入上述三股時,縱已大升幾成,P/E仍為單位數,之後回報五成至一倍,夫復何求?

新手股海求勝,本少,不怕盤大易買難走,應嚴選出手機會,務必市況、業績、走勢三者皆好時才行動。也許匯豐(0005)、宏利(0945)、中人壽(2628)終能重振雄風,擺脫廢股惡名,大升幾倍。但各過氣股王基本因素一日不變,走勢仍弱過藥煲,不如遵從上述「三好原則」,集中攻擊,先贏為敬,遠勝不斷夜行吹口哨,自我精神安慰。