tar -czvf archivefilename.tar.gz foldername1 foldername2
-c: Create
-z: Compress
-v: Display progress
-f: Name of the archive.
tar -czvf archivefilename.tar.gz foldername1 foldername2
find . -type f -name 'myfilename' -exec rm {} +
egrep -R -H -n -C1 --include=*.c --include=*.h 'searchstring'
egrep -R -H -n -C1 --include=*.c --include=*.h 'char\s+\*actual'
mkdir mySolution
cd mySolution
dotnet new sln
Create a folder for the main project, then create the main project (myProject):mkdir myProject
cd myProject
dotnet new console
Create a folder for the test project, then create the test project (myTests):cd ..
mkdir myTests
cd myTests
dotnet new mstest
Switch back to the solution folder and add the main project and test project into the solution file (mySolution.sln, myProject.csproj, myTests.csproj):cd ..
dotnet sln mySolution.sln add myProject/myProject.csproj myTests/myTests.csproj
Switch to the tests project folder and add a Reference to the main project (myTests, myProject):cd myTests
dotnet add reference ../myProject/myProject.csproj
Switch back to the solution folder and run the tests (myTests):cd ..
dotnet test myTests/myTests.csproj
#!/bin/sh
#$1 is the solution name
#$2 is the main project name
#$3 is the main project type e.g. console, classlib, web etc.
echo "Create a folder for the whole solution and create the solution"
mkdir $1
cd $1
dotnet new sln
echo "Create a folder for the main project, then create the main project"
mkdir $2
cd $2
dotnet new $3
echo "Create a folder for the test project, then create the test project"
cd ..
mkdir $2Tests
cd $2Tests
dotnet new mstest
echo "Switch back to the solution folder and add the main project and test project into the solution file"
cd ..
dotnet sln $1.sln add $2/$2.csproj $2Tests/$2Tests.csproj
echo "Switch to the tests project folder and add a Reference to the main project"
cd $2Tests
dotnet add reference ../$2/$2.csproj
echo "Switch back to the solution folder and run the tests"
cd ..
dotnet test $2Tests/$2Tests.csproj
./CreateVsCodeSolution.sh mySol2 myProj2 console