Premium Only Content

Linux Terminal Kurs Teil 3 - touch
#MiBaTech#MiBaHealthAndNutrition#MiBaFunAndGames
Willkommen zum dritten Teil meines Terminal-Kurses.
Heute wollen wir uns etwas genauer mit dem Befehl "ls" beschäftigen.
Der Befehl "ls" steht für "list files and directories" und zeigt euch an, was sich im jeweiligen Verzeichnis befindet.
Er kann auf verschiedene Weisen kombiniert werden.
touch <filename>
touch test1 test2
touch test{1..10}
touch test_{a..j}
stat filename
Die Informationen erhalten wir von stat
Im Folgenden finden Sie die Informationen, die wir über die Datei erhalten, wenn wir den Befehl stat ausführen.
Datei: Der Name der bereitgestellten Datei. Wenn es sich bei der bereitgestellten Datei um einen Symlink handelt, unterscheidet sich der Name.
Größe: Die Größe einer bestimmten Datei in Bytes.
Blöcke: Gesamtzahl der der Datei zugewiesenen Blöcke, die auf der Festplatte gespeichert werden sollen.
E/A-Block: Die Größe jedes zugewiesenen Blocks in Bytes.
Dateityp: Die Datei kann Folgendes sein: Normale Dateien, spezielle Dateien, Verzeichnisse oder symbolische Links.
Gerät: Gerätenummer im Hexadezimalformat.
Inode: Inode-Nummer der Datei.
Links: Anzahl der Hardlinks der Datei.
Zugriff: Zugriffsberechtigungen in den numerischen und symbolischen Methoden.
Kontext: Das Feld speichert den SELinux-Sicherheitskontext.
Zugriff: Der letzte Zeitpunkt, zu dem auf die Datei zugegriffen wurde.
Ändern: Der letzte Zeitpunkt, zu dem die Datei geändert wurde.
Änderung: Der letzte Zeitpunkt, an dem das Attribut oder der Inhalt der Datei geändert wurde.
Erstellt: Der Zeitpunkt, zu dem die Datei erstellt wurde.
File: The name of the provided file. If the provided file is a symlink, the name will differ.
Size: The size of a given file in Bytes.
Blocks: Total number of allocated blocks to the file to store on the hard disk.
IO Block: The size of every allocated block in bytes.
File type: The file may be of the following: Regular files, special files, directories, or symbolic links.
Device: Device number in hexadecimal format.
Inode: Inode number of the file.
Links: Number of hard links of the file.
Access: Access permissions in the numeric and symbolic methods.
Context: The field stores the SELinux security context.
Access: The last time at which the file was accessed.
Modify The last time at which the file was modified.
Change: The last time the at which file’s attribute or content was changed.
Birth: The time at which the file was created.
===============================================================================
Some of the options used with touch command are:
touch -a: change access time
touch -c: do not create files
touch -m: change modification time
touch -d <string> <filename> option to set a timestamp using a date string
touch -d tomorrow test
Change Access Time to Current
Use the -a tag to change a file's access time. The general syntax is:
touch -a <filename>
For example, to show a file's access time, run:
ls -lu
Next, change the access time for the file named test with:
touch -a test
Lastly, view the changed time by running:
ls -lu
===================================================================
touch -t <timestamp> <filename> Use specific time (instead of current time)
[[CC]YY]MMDDhhmm[.ss]
To break down this syntax, anything that is between the square brackets is optional. Below is what each cipher-like character stands for:
CC - the first two digits for a year
YY - the last two digits for a year
MM - the month
DD - the day
hh - the hour
mm - the minutes
ss - the seconds
touch -t 199901010000 test1
For example, to change the timestamp for a file called test to midnight January 1st, 1999, run:
==================================================================
Set File Timestamp Using Date String
The touch command uses the -d option to set a timestamp using a date string. The syntax is:
touch -d <string> <filename>
The date string is a flexible time format and accepts many different human-readable textual forms. Some examples include:
Calendar dates, such as 19 August 2020.
Time of day, such as 9:27pm or 8:02am.
Days of the week, such as Sunday, Monday, etc.
Relative time, such as 5 years ago, yesterday, next tuesday, etc.
For example, change the timestamp using the -d option to tomorrow:
================================
Playlist:
https://www.youtube.com/watch?v=uarQolcS5d8&list=PLq7y778vthUDlQdlLmzJPOJyLYXxBObzC&index=1
Timeline
0:46 df Befehl
1:38 du Befehl
3:10 free Befehl
Wenn euch das Video gefällt, würde ich mich über einen Like und ein Abo freuen. :)
MiBaTech,
stat, touch,touch -a,touch -t, Befehle, echo, cat, mkdir, rm, rmdir,
cp,mv,man,more,lees,sudo,chmod,top,htop,btop,which,whatis,version
Linux-Tutorials,dl,du,free
Ubuntu-Anleitung,
Linux-Befehle,
Linux-Grundlagen,
Linux-Distributionen
Linux-Installation,
Shell-Programmierung,
Open-Source-Software,
Linux-Anfänger,
Linux-Server-Konfiguration,
Terminal-Befehle,
Kommandozeilen-Tutorial,
Shell-Skripting,
Terminal-Tricks,
Befehlszeile für Anfänger,
Terminal-Fehlerbehebung,
Terminal-Hacks,
Linux-Kommandozeile,
Konsole verwenden,
Terminal-Shortcuts,
Audio- und Video-Bearbeitung,
Video schneiden,
Audio bearbeiten,
Videobearbeitungssoftware,
Tonmischung,
Videoeffekte,
Filmbearbeitung,
Videoproduktionstipps,
Audioaufnahme-Tutorial,
Video-Rendering,
Color Grading
-
2:05:53
Inverted World Live
7 hours agoDeath Cult Terror Cells, NASA Bans Chinese Nationals | Ep. 108
64.1K11 -
2:43:57
TimcastIRL
8 hours agoVP Says No Unity With Democrats Celebrating Charlie Kirk Assassination, Left Confirmed | Timcast IRL
283K181 -
13:45
The Charlie Kirk Show
7 hours agoTPUSA AT ASU CANDLELIGHT VIGIL
227K66 -
55:10
Katie Miller Pod
7 hours ago $15.27 earnedEpisode 6 - Attorney General Pam Bondi | The Katie Miller Podcast
101K29 -
1:46:41
Man in America
12 hours agoLIVE: Assassin Story DOESN'T ADD UP! What Are They HIDING From Us?? | LET'S TALK
81.6K106 -
2:24:17
Barry Cunningham
8 hours agoFOR PRESIDENT TRUMP WILL TAKE NO PRISONERS AND THE LIBS SHOULD EXPECT NO MERCY!
117K73 -
1:08:41
Savanah Hernandez
8 hours agoCharlie Kirk Was Our Bridge And The Left Burned It
64.8K57 -
1:59:01
Flyover Conservatives
11 hours agoFinancial Web Behind Charlie Kirk's Murder with Mel K | Silver On It's Way to $50 | FOC Show
73K11 -
2:36:19
We Like Shooting
19 hours ago $1.73 earnedWe Like Shooting 628 (Gun Podcast)
47.4K1 -
1:09:26
Glenn Greenwald
10 hours agoTrump's Shifting Immigration and H-1B Policies: With Journalist Lee Fang and Political Science Professor Ron Hira | SYSTEM UPDATE #515
180K41