❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

Learning Fundamentals of Linux from scratch day-2 : Basic shell commands

6 February 2024 at 05:15

Today, in session 2, on Kaniyam- https://kaniyam.com/linux-course-feb-2024/ I learnt basic shell commands.

ls #prints all files and folders (not hidden)
ls -a #prints hidden files
ls -l #long listing
ls -al #long listing with hidden files
ls -h #human readable
ls -lh #long listing + human readable
ls -lS #sorted
ls -lt #most recently modified file at the top
ls -R #recursive listing
date --date="3 years ago"
cat filename.txt #view file
cat > sample.txt #concatenate to file, end with ctrl+D
cat sample1.txt sample1.txt sample2.txt #cat can be used to concatenate and display multiple files
history | head #displays first ten commands; only 1k stored)
history | tail #displays last ten commands from the 1k stored
history -d 1459 #deletes the command by event number from history
rm file.txt #removes this file
rm -i file.txt # asks for an option to confirm (interactive)
rm -r directory1/ #recursively deletes directory and all its contents
rm *.txt #deletes all files with that extension (*- all)
man ls #man pages for a given command
man history

Learning Fundamentals of Linux from scratch day-2 : Basic shell commands

6 February 2024 at 05:15

Today, in session 2, on Kaniyam- https://kaniyam.com/linux-course-feb-2024/ I learnt basic shell commands.

ls #prints all files and folders (not hidden)
ls -a #prints hidden files
ls -l #long listing
ls -al #long listing with hidden files
ls -h #human readable
ls -lh #long listing + human readable
ls -lS #sorted
ls -lt #most recently modified file at the top
ls -R #recursive listing
date --date="3 years ago"
cat filename.txt #view file
cat > sample.txt #concatenate to file, end with ctrl+D
cat sample1.txt sample1.txt sample2.txt #cat can be used to concatenate and display multiple files
history | head #displays first ten commands; only 1k stored)
history | tail #displays last ten commands from the 1k stored
history -d 1459 #deletes the command by event number from history
rm file.txt #removes this file
rm -i file.txt # asks for an option to confirm (interactive)
rm -r directory1/ #recursively deletes directory and all its contents
rm *.txt #deletes all files with that extension (*- all)
man ls #man pages for a given command
man history
❌
❌