488891
101
Zoom out
Zoom in
Vorherige Seite
1/178
Nächste Seite
7.3.1 Examples for Working with Files and Directories
Suppose you want to copy a le located somewhere in your home directory to a
subdirectory of /tmp that you need to create rst.
Procedure 7.1 Creating and Changing Directories
From your home directory create a subdirectory in /tmp:
1 Enter
mkdir /tmp/test
mkdir stands for “make directory”. This command creates a new directory
named test in the /tmp directory. In this case, you are using an absolute path
to create the test directory.
2 To check what happened, now enter
ls -l /tmp
The new directory test should appear in the list of contents of the /tmp direc-
tory.
3 Switch to the newly created directory with
cd /tmp/test
Procedure 7.2 Creating and Copying Files
Now create a new le in a subdirectory of your home directory and copy it to /tmp/
test. Use a relative path for this task.
IMPORTANT: Overwriting of Existing Files
Before copying, moving or renaming a le, check if your target directory already
contains a le with the same name. If yes, consider changing one of the lenames
or use cp or mv with options like -i, which will prompt before overwriting an ex-
isting le. Otherwise Bash will overwrite the existing le without conrmation.
1 To list the contents of your home directory, enter
ls -l ~
It should contain a subdirectory called Documents by default. If not, create this
subdirectory with the mkdir command you already know:
mkdir ~/Documents
Shell Basics 91
101

Brauchen Sie Hilfe? Stellen Sie Ihre Frage.

Forenregeln

Missbrauch melden von Frage und/oder Antwort

Libble nimmt den Missbrauch seiner Dienste sehr ernst. Wir setzen uns dafür ein, derartige Missbrauchsfälle gemäß den Gesetzen Ihres Heimatlandes zu behandeln. Wenn Sie eine Meldung übermitteln, überprüfen wir Ihre Informationen und ergreifen entsprechende Maßnahmen. Wir melden uns nur dann wieder bei Ihnen, wenn wir weitere Einzelheiten wissen müssen oder weitere Informationen für Sie haben.

Art des Missbrauchs:

Zum Beispiel antisemitische Inhalte, rassistische Inhalte oder Material, das zu einer Gewalttat führen könnte.

Beispielsweise eine Kreditkartennummer, persönliche Identifikationsnummer oder unveröffentlichte Privatadresse. Beachten Sie, dass E-Mail-Adressen und der vollständige Name nicht als private Informationen angesehen werden.

Forenregeln

Um zu sinnvolle Fragen zu kommen halten Sie sich bitte an folgende Spielregeln:

Neu registrieren

Registrieren auf E - Mails für Suse openSUSE 11.3 wenn:


Sie erhalten eine E-Mail, um sich für eine oder beide Optionen anzumelden.


Das Handbuch wird per E-Mail gesendet. Überprüfen Sie ihre E-Mail.

Wenn Sie innerhalb von 15 Minuten keine E-Mail mit dem Handbuch erhalten haben, kann es sein, dass Sie eine falsche E-Mail-Adresse eingegeben haben oder dass Ihr ISP eine maximale Größe eingestellt hat, um E-Mails zu erhalten, die kleiner als die Größe des Handbuchs sind.

Ihre Frage wurde zu diesem Forum hinzugefügt

Möchten Sie eine E-Mail erhalten, wenn neue Antworten und Fragen veröffentlicht werden? Geben Sie bitte Ihre Email-Adresse ein.



Info