Managing files, links and regex
These are basic common-use, for more check the holy man!
File managing and text processing commands
echo string #Prints "string"
echo string > file1 #Overwrites or creates file1 with string
echo string >> file1 #Creates file1 and/or appends string at the end of file1
echo $PATH #Prints contents of variable/environment variable
echo $(command) #Prints output of whatever command
echo $(date) #Print current date
echo * #Prints the name of all items in the current directory
echo */ #Prints only the name of all directories in the current directory
echo *.txt #Prints all items in the current directory ending in .txt
echo \* #Escapes and prints literal "*"
echo a \\n b #Prints line feed between "a" and "b"
echo a \\c b #Produces no further output after \c, so "b" is not printed
echo a \\t b #Prints a TAB between "a" and "b"
echo a \\v b #Prints a vertical TAB between "a" and "b"
echo 12\\b3 #Backspaces character just before \\b, will print 13
commandX && echo "Done" #Will only print "Done" if "commandX" is succesful
commandX || echo "Error" #Will print "Error" if "commandX" is unsuccesful
echo "\033[1;31mThis is red" #Prints string after "m" in red color
echo "\033[5;31mFlashing red" #Prints string in red that will blink constantly
#\033 is for Escape, some colors: [1;33mOrange, [1,34mBlue, [1;35mPurple
Links
TAR & Compressing/Decompressing
Last updated