Command lines for beginner
Basic command lines.
Create a directories:
mkdir <name>
Create a file:
touch <file name> =>create a empty file-without content
Create a file with a text:
echo "text here" >> <file name>.<extension>
Ex:echo "hello" >> star.txt
Get the current folder path :
pwd
Open the current folder:
open.
List file and sub directories:
ls
List hidden files or directories in a table format:
ls -al
View the content of the file:
cat <file name>
Pull a repository from GitHub to local:
git clone <repository_url
Push a repository from local to GitHup:
git add .(all) or (file name
git commit -m<note> =>first commit
git push
Copy files
cp <file>
move files:
mv <file>
Delete files or directoies :
rm <file>
How to delete a git commit:
git rm <file>
ls
git status
git add .(all) or (file)
git commit -m <note>
git push
LINUX:
. => current folder
Ex: Users/Mac/projects
.. => previous folder
Ex: User/Mac
Search for fragments of text inside larger bodies of text:
grep
Download files found at specific URLs:
curl
###