Day β 1 in Commands Practice
Today Learned below commands.
List Commands
ls -> it listed out all the files
ls -l -> it gave long listing items
ls -lh -> it returns items with human readable file size
ls -lS -> it sorted out the files
ls -lSh -> it sorted the files also it returns file with human readable format
ls -R -> returned all the files in the directory
whoami -> shows the current user
hostname -> shows the hostname
hostname -I -> shows the IP address of the user
Date Commands
date -> displayed current date
date βdate=βtomorrowβ -> prints the tomorrow date
date βdate=β3 years agoβ -> prints the date 3 years ago.
CAT Commands : Concatenate commands
cat > test1.text -> creates a new file
cat test1.text | less -> show the file in page fize
q -> to quit
ECHO Commands
echo βHello worldβ -> it usually prints the data.
History Commands
history -> it displays the last 1000 commands executed in our machine. we can increase the limit
history 10 -> executes last 10 commands
history | head -> shows first 10 commands
history | tail -> last 10 commands
history !1000(event) -> executed the specified event command.
Remove command
rm -i test1.text -> it asks user permission whether to delete this or not
rm test1.text -> removes the files
rm * text -> removes all the files which are text file type.
Manual command
man ls -> shows all the information about ls command
man date -> displayes all the info about date command
z -> to down the page.
w -> to go up in the page.