Apply for Zend Framework Certification Training

c



< c compiler installation Compile a C file using its filename >



cmd commands for windows and macos
command-line commands for Windows CMD and macOS Terminal, here is a useful comparison for beginners.
Windows CMD vs macOS Terminal
Task                               Windows CMD                macOS Terminal
Show current directory    cd                                 pwd
List files/folders              dir                                 ls
Change directory            cd folder                         cd folder
Go one level up              cd ..                               cd ..
Go to root                      cd \                                cd /
Clear screen                   cls                                 clear
Create folder                  mkdir folder                    mkdir folder
Remove empty folder      rmdir folder                    rmdir folder
Create empty file            type nul > file.txt            touch file.txt
Delete file                      del file.txt                       rm file.txt
Copy file                        copy a.txt b.txt               cp a.txt b.txt
Move file                        move a.txt folder             mv a.txt folder
Rename file                    ren old.txt new.txt mv old.txt new.txt
Display file contents type file.txt cat file.txt
Find a command where gcc which gcc
Show IP/network information ipconfig ifconfig / ipconfig getifaddr en0
Test network ping google.com ping google.com
Show running processes tasklist ps / top
Exit terminal exit exit
1. Check your current location
Windows:
cd
Example output:
C:\Users\Rajesh
macOS:
pwd
Example output:
/Users/rajesh
2. List files and folders
Windows CMD:
dir
macOS:
ls
For detailed information on macOS:
ls -l
3. Change directory
Both use cd:
cd Documents
or:
cd Documents
Go back one folder:
cd ..
4. Create a folder
Windows:
mkdir CPrograms
macOS:
mkdir CPrograms
Then enter it:
cd CPrograms
5. Create a C file
Windows CMD:
type nul > hello.c
macOS Terminal:
touch hello.c
You can then check it:
Windows:
dir
macOS:
ls

< c compiler installation Compile a C file using its filename >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top