🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 2 Min Lesezeit
0

Rename Functions, Variables, or Text Across Multiple Files with One Command! 🔍🔄

↗ Quelle (dev.to)
🗣️ Stimme:

I’ve come into situation before while I was building Employee Management System Full-stack website, Where I needed to change name of variable and some functions but the issue was that they are used in many files.



For them being used in multiple files it wasn’t logically to manually detect them in each file and replace them.



One solution I found is using Linux commands :




CODE
find . \( -path "./node_modules"  \) -prune -o -name "*.js" -exec sed -i "s/old_text/new_text/g" {} +








  • find : is used to find certain files, here we use it to find all .js files


  • \( \) : the backslashes are used for Linux to execute what’s inside instead of giving an error


  • -path : To specify certain path which we will prune


  • -prune : To ignore certain paths from this command’s execution


  • -o : Is or option so if left side is executed ( which is ignoring “node_modules” ) we skip executing rest of command after -o .


  • -name "*.js" : to find any file that is .js when it’s not “node_modules” folder.


  • -exec sed : To execute replacing command which is sed.


  • -i : to actually change text in file.

  • {} is a placeholder for the file or directory name that the find command matches.

  • + : Called batch mode tells find to pass multiple matched files to the command in batches instead of running the command once per file.









Usage Example



I have 2 test.js files one of them is in “node_modules” folder, Both of them has text “baraa mohamed”.



So we execute following command.




CODE
find . \( -path "./node_modules"  \) -prune -o -name "*.js" -exec sed -i "s/baraa/XBaraaX/g" {} +









  • After execution result of test.js outside “node_modules” :




CODE
XBaraaX mohamed








  • Also after executing we find test.js inside “node_modules” :




CODE
baraa mohamed






As you can see it did not change as we pruned ( ignored ) the whole “node_modules” directory.



🤍 I'd love to connect with you on LinkedIn—let's grow our network and share ideas! here

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Rename Functions, Variables, or Text Across Multiple Files with One Command! 🔍🔄

Thematisch verwandte Begriffe: Rename, Functions, Variables, Text · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...