Mosh Data Structure Course in Java
https://drive.google.com/drive/folders/11giCXO2woDksDU9Veig4CFaVLQ4_4eBZ?usp=sharing
Mosh Data Structure Course in Java
https://drive.google.com/drive/folders/11giCXO2woDksDU9Veig4CFaVLQ4_4eBZ?usp=sharing
If you are getting the error
""" 'python' is not recognized as an internal or external command,
operable program or batch file. """
Locate you python installed directory,
Then Open Environment Variables and
Select Path , double click on it
add new path then paste here the new path
you are done
HaseebAbbasi00.blog.cot.com
1. Install c++ in linux
2. Copy and paste the code then save with cpp extension.
3. write "g++ filename.cpp -o program"
4. write "./program"
then enter the partition sda number you want to remove permissions
#include<iostream>
#include "stdlib.h"
using namespace std;
int main()
{
string = "AbdulHaseeb.program.to.remove.linux.permission.";
string message = "please enter the sda number to remove permissions";
string number_sda = "";
bool run = true;
while(run)
{
cout<<message<<endl;
cout<<"write 0 for exit"<<endl;
string commond_1 = "sudo fsck -f /dev/sda";
string commond_2 = "sudo ntfsfix /dev/sda";
cin>>number_sda;
if(number_sda=="0")
break;
commond_1+=number_sda;
commond_2+=number_sda;
char cmd_1[commond_1.length()];
char cmd_2[commond_2.length()];
for(int i=0; i<=commond_1.length(); i++)
{
cmd_1[i] = commond_1[i];
}
for(int i=0; i<=commond_2.length(); i++)
{
cmd_2[i] = commond_2[i];
}
system (cmd_1);
system (cmd_2);
}
}
| Bash | PowerShell | Description |
|---|---|---|
| ls | dir, Get-ChildItem | List files and folders |
| tree | dir -Recurse, Get-ChildItem -Recurse | List all files and folders |
| cd | cd, Set-Location | Change directory |
| pwd | pwd, $pwd, Get-Location | Show working directory |
| clear, Ctrl+L, reset | cls, clear | Clear screen |
| mkdir | New-Item -ItemType Directory | Create a new folder |
| touch test.txt | New-Item -Path test.txt | Create a new empty file |
| cat test1.txt test2.txt | Get-Content test1.txt, test2.txt | Display files contents |
| cp ./source.txt ./dest/dest.txt | Copy-Item source.txt dest/dest.txt | Copy a file |
| cp -r ./source ./dest | Copy-Item ./source ./dest -Recurse | Recursively copy from one folder to another |
| mv ./source.txt ./dest/dest.txt | Move-Item ./source.txt ./dest/dest.txt | Move a file to other folder |
| rm test.txt | Remove-Item test.txt | Delete a file |
| rm -r <folderName> | Remove-Item <folderName> -Recurse | Delete a folder |
| find -name build* | Get-ChildItem build* -Recurse | Find a file or folder starting with 'build' |
| grep -Rin "sometext" --include="*.cs" | Get-ChildItem -Recurse -Filter *.cs | Select-String -Pattern "sometext" | Recursively case-insensitive search for text in files |
| curl https://github.com | Invoke-RestMethod https://github.com | Transfer data to or from the web |