Posts

Showing posts with the label shell

Execute bash command from python shell console.

Image
Execute bash command from python shell console . Almost Every unix., Linux machine came with pre-installed python sometimes the distribution may came by an older version but you can update it by simpl command line. python is a very powerful language that has a lot of features and an active community, And the ability to download any library without mentioning its standard library (pre-installed library) that are installed by default exemple ( datetime, math, random, os, multiprocessing, subprocess, socket, email, json...)    Désavantages of bash scripting Python is a  Shell scripting language which means it is developed mainly to deal with the system and its files, just like bash. Each scripting language has its benefits for example when it is came to dealing with systems files (copying, renaming, creating, reading...) bash provides better experience for every day using then any other language using cd, mv, cp, ls ... command. Bash disadvantage appears ...

Linux command you need to know

Image
Some Linux command that you can use it in termux emulater this command can be used for every Linux distribution. cd command Cd [directory name] use this command to move from local directory to next/previous directory For examples : if you are in a directory called "local _directory" contain  other directories one of them named "next_directory", to move from "local_directory " to " next_directory" just type : cd next_directory then hit enter, if next_directory contain an other directory jus type cd directory_name , in case you want to return to previous folder in this case you don't have to know the name of the file just type cd ..  (cd space then 2 point) then hit enter. Linux command are very sensitive when it came to the syntaxe, you must be careful in spelling of every letter you write and specially big and small one for example "Cd" is not the same as "cd" and not the same as "CD", otherwise you will have e...