Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo

mit welchem befehl kann ich in ALLEN Dateien auf der Festplatte nach einem bestimmten Inhalt suchen?

also mit "grep "suchwort" "Datei" kann ich ja eine einzelne datei durchsuchen, aber ich muss alle dateien durchsuchen, geht das irgendwie??

gruß

christian

grep -r <begriff> /*

Aber WARUM willst du das machen?

Hallo

mit welchem befehl kann ich in ALLEN Dateien auf der Festplatte nach einem bestimmten Inhalt suchen?

also mit "grep "suchwort" "Datei" kann ich ja eine einzelne datei durchsuchen, aber ich muss alle dateien durchsuchen, geht das irgendwie??

gruß

christian

quick and dirty ?

cd /

find . -type f -exec grep -i <suchstring> {} \;

Gibt evtl was eleganteres ... ist mir aber nicht eingefallen :floet:

gruesse

s7n

Edit: Ja, ok, grep -R :) Dafür funktioniert meine Lösung auch unter AIX :P

grep -r <begriff> /*

Aber WARUM willst du das machen?

Hi,

danke erstmal, auch an alle anderen.

Ich suche eine bestimmte konfigurationsdatei, ich kenne weder den ort wo diese liegen soll, noch den namen der datei. Ich weiß nur was darin steht, und jetzt versuche ich mit deinem befehl, diese datei zu finden.

gruß

Warum dann nicht gleich / als aktuelles Suchverzeichnis verwenden?

find / -type f -exec grep -i <suchstring> {} \;

:floet: OK, 1:0 für dich ... ich war grad so im Tran vorhin

Von der find-exec-Methode rate ich dringend ab. Zigtausend Forks sind dann doch ein nicht ganz kleiner Overhead ... ;)

Von der find-exec-Methode rate ich dringend ab. Zigtausend Forks sind dann doch ein nicht ganz kleiner Overhead ... ;)

Naja, quick and dirty !

:cool:

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.