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
-
1:32:33
VapinGamers
1 hour ago $3.01 earnedTools of the Trade - EP12 The Art of Story Telling with MidnightinTheMountains - !rumbot !music
9.37K1 -
LIVE
SOLTEKGG
1 hour ago🔴LIVE - Battlefield 6 - Going Pro in RED SEC
201 watching -
LIVE
Midnight In The Mountains™
2 hours agoThe Midnights Play Arc Raiders | Loot Scoot and KILL | Crypto Wallet up n running GO JOIN THE BETA!
134 watching -
53:25
X22 Report
4 hours agoMr & Mrs X - Trump Is Using The Same Tactic As Our Founding Fathers To Rebuild America - EP 17
66.9K14 -
LIVE
PudgeTV
1 hour ago🟣 Arc Raiders - Gaming on Rumble | Going Topside w My Daughter’s Husband
80 watching -
2:05:43
LFA TV
20 hours agoRUMBLE RUNDOWN WEEK 7 with SHAWN FARASH 11.22.25 9AM
130K7 -
LIVE
ttvglamourx
1 hour ago $0.60 earnedGLAMOURX VS CALL OF DUTY LOBBIES !DISCORD
139 watching -
LIVE
DannyStreams
4 hours agoSaturday Morning Tarky
70 watching -
1:12:53
Wendy Bell Radio
7 hours agoPet Talk With The Pet Doc
26.4K20 -
LIVE
CHiLi XDD
1 hour agoFF7 Remake | Materia Hunting at its finest!
62 watching