1. Input a line of text and display on standard output
Outputs the following text:
2. Declare a variable and echo its value. For example, Declare a variable of x and assign its value=10.
echo its value:
Note: The ‘-e‘ option in Linux acts as interpretation of escaped characters that are backslashed.
3. Using option ‘\b‘ – backspace with backslash interpretor ‘-e‘ which removes all the spaces in between.
4. Using option ‘\n‘ – New line with backspace interpretor ‘-e‘ treats new line from where it is used.
5. Using option ‘\t‘ – horizontal tab with backspace interpretor ‘-e‘ to have horizontal tab spaces.
6. How about using option new Line ‘\n‘ and horizontal tab ‘\t‘ simultaneously.
7. Using option ‘\v‘ – vertical tab with backspace interpretor ‘-e‘ to have vertical tab spaces.
8. How about using option new Line ‘\n‘ and vertical tab ‘\v‘ simultaneously.
Note: We can double the vertical tab, horizontal tab and new line spacing using the option two times or as many times as required.
9. Using option ‘\r‘ – carriage return with backspace interpretor ‘-e‘ to have specified carriage return in output.
10. Using option ‘\c‘ – suppress trailing new line with backspace interpretor ‘-e‘ to continue without emitting new line.
11. Omit echoing trailing new line using option ‘-n‘.
12. Using option ‘\a‘ – alert return with backspace interpretor ‘-e‘ to have sound alert.
Note: Make sure to check Volume key, before firing.
13. Print all the files/folder using echo command (ls command alternative).
14. Print files of a specific kind. For example, let’s assume you want to print all ‘.jpeg‘ files, use the following command.
15. The echo can be used with redirect operator to output to a file and not standard output.
echo Options
Options | Description |
-n | do not print the trailing newline. |
-e | enable interpretation of backslash escapes. |
\b | backspace |
\\ | backslash |
\n | new line |
\r | carriage return |
\t | horizontal tab |
\v | vertical tab |
mv: Short for move, this command can be used to move your files from one folder to another.
rm: Short for remove, this command is used to remove any files or folders.
remove all file in directory with prompt
rm /mapr/user/p2ki/spark-warehouse/billing_determinant/FORECAST_SAMPLE.csv/*
cd: Short for change, you can use this command to change your current directory.
cp: Short for copy, this command can be used to copy files or folders in a directory.
chown: This command is used to change ownership of a file.
chmod: This command is used to change permissions on a file.
ls: Short for list, this command can be used to view all of the files and folders in your current working directory.
pwd: Short for present working directory, this command can be used to display the directory in which you are currently working.
sudo: Also referred to as superuser do, a sudo command allows you to run other commands with administrative privileges. This command is especially useful for modifying files in a directory that a user wouldn't necessarily have access to.
cd: Short for change directory, this command can be used to change the directory in which you are currently working. There are a variety of cd commands that can be used to take you to specific files or folders.
cd / : An alternate to a basic cd command, the cd / command can be used to take you to the root directory.
cd .. : This command can be used to take you up one directory level.
cd - : This command can be used to navigate to a previous directory.
copy command
sudo cp twitter.conf /etc/flume-ng/conf
rm -r mydir
remove all file in directory without prompt
rm -rf mydir
For shutdown: sudo poweroff For restart: sudo reboot
chmod -R 777 file chmod -R 777 *
All those tables are created with parquet format,When we create hive tables in CSV or other format, the table will have 777 permission for all the users who have access to the group we part of.But when hive table is created in parquet format only the user who has created the table will have write access. I think it has to do something with parquet format !!!
LIST OF ALL INSTALLED PROGRAMS IN LINUX
dpkg -l
No comments:
Post a Comment