Commonly used Linux Commands
These are the commands that you need to know when you work with Mac OS terminal or Ubuntu or any Linux based distribution during Ruby development.
It is important to know these Linux Commands like how to create file, move directory, delete files and list files in a directory in the Linux Environments.
|List Contents of the Directory (-l for detail format and -a for hidden files)||
|Check the current directory||
|Create New Directory||
|Change one Directory back||
cp <sourcelocation> <targetlocation>
|Copy files from one location to another||
cp file1 file2
mv <sourcelocation> <targetlocation>
|Move files from one location to another (Rename too!)||
mv file1 file2
|Create a new File||
echo "content" >> <filename>
|Add Content to File||
echo "This is a test file" >> file.rb
|Search String in the File||
cat file.rb | grep "file"
|Remove the File||
rm -rf <directoryname>
|Remove all Files in the Directory||
rm -rf my_app
|Clear the Screen||