Answers for "meto"

0

meto

$0 \\resualt oprating  in shell screpting

sudo -H gedit   فتح الملفات في محرر النوت حلو  بدل النانو
<<<<<<<<<<<
awk '{print $1}' qwe.txt       //$1 first  $2 secand item
awk '{print $1}' qwe.txt > test.txt
awk '{print $NF}'   // بجيب اخر عامود من الكلام
awk '/hmood/ {print}' test.txt   // يبحث عن كلمت حمود وبجيب كل السطر وبيطبعه  
awk -F: '{print $1}' file.txt  // النقطتين والاف بيعنو انه بدل المسافة في النقطتين واحسب سير على النقطتين
awk {print $1,$2,$3}' meto.txt         
awk '/how/ {print $1}' meto.txt   بس بيبحث في اول عامود عن كلمة معينة 
awk '$1 == "#" {print $2}' test.sh   بمعنى ازا كان اول عامود يحتوي على # اطبعلي العامود التاني من نفس السطر 
cat test.txt | awk '{$3="hmood"; print $0}'  //استبدل الكلام يلي في العامود التاني في كلمت حمود

<<<<<<<<<<
printf "1\n2\n3\n"
printf "1\n2\n3\n" | xargs touch  //هون رح ينشأفيلات بأسم 1  2 3 
ls | xargs rm  //رح  يحزف كل الفايلات يلي في لست او النتيجت
printf "1\n2\n3\n" | xargs touch {}.txt  /// create file 
xargs هي بمعنى اخذ مخرجات امر واستخدامه في امر اخر مثل 
ls |xargs rm  هاد الامر بيحذف كل الفايلات والملفات يلي انتجهم امر لس 
seq 3 | xargs -n 1  echo"Number" 
xargs -a file.txt بيقرأ محتوى الملف مثل كات   
<<<<<<<<<<<<<<<<<<<<<
كيفية استخدام أوامر SCP لنقل الملفات بأمان
#sed           http://sed.sourceforge.net/sed1line.txt
sed -i  's/3/4/' file.txt  استبدال 3 في 4
sed -i 's/Welcome/meto/' qwe.sh  #الاستبدال تم في الملف الاصلي عشان ضفة السالب اي 
sed -i 's/^t/T/' qwe.sh    #استبدال يتم على اول حرف من السطر بأضفة العلامة ^ بس 
sed -i 's/#mode/mode/' qwe.sh


# substitute "foo" with "bar" ONLY for lines which contain "baz"
 sed '/baz/s/foo/bar/g'


sed  's/192.168.1.16/10/g' test.sh > test1.txt  استبدال الارقام وطباعة النتيجة في ملف جديد 
sed  's/192.168.1.16/10/g' test.sh >> test.txt && rm test.txt   استبدال الارقام مع حذف الملف القديم واستبداله بالمملف الجديد ونص الجديد 

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#example cut  هاي تستخدم لقط النص بعد اوقبل علامة محددة مثلا : هاي 
cat <<EOF>> file.txt
meto:123
qwe:147
qww:1555
EOF 
head file.txt | cut -f 2 -d :
head file.txt | cut -f 1,2 -d : --output-delimiter=,    استبدلنا المخرجات في فاصلة بدل علامة :النقطتين 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<   

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#for print text in end file 
cat <<EOF>> yourfile.txt 
line1
line2
line3
EOF

#for print text and remove past txt
cat <<EOF>> yourfile.txt
line1
line2
line3
EOF


#creat or cope text for end file use sudo
sudo bash -c 'cat << EOF >> yourfile.txt
line1
line2
line3
EOF'


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

#hmood
alias bashrc="sudo code .bashrc --user-data-dir"
#alias

alias lock="xmodmap -e 'add mod3 = Scroll_Lock'"
alias st="sudo systemctl status"
alias stt="sudo systemctl start"
alias sttt="sudo systemctl restart"
alias sts="sudo systemctl stop"
alias ini="sudo apt-get install -y"
alias cls="clear"
alias box="sudo virtualbox"
alias myip="curl ifconfig.io"
Posted by: Guest on October-06-2021
0

meto

sudo systemctl list-units --failed


>>>>>>>>>>>>>>>>>>>>>>>>>>     scroll_lock       >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

https://itectec.com/ubuntu/ubuntu-turn-the-caps-lock-led-on-while-keep-caps-lock-status-is-off/


                                                                                       خطوات معرفة الحل بترتيب:21.04 
                                                                                       
The Solve from Multi Steps 100% :
Step 1 :

ls /sys/class/leds/    ## input6::scrolllock  
Step 2 : ## for test 

ls '/sys/class/leds/input6::scrolllock'     ## brightness 
cat '/sys/class/leds/input6::scrolllock/brightness' 
######
The only thing which is important for us is the brightness file content.
0 means the LED is off.
1 means the LED is on
########
step 3 :

##We get the current LED state by checking the brightness file's content 0 (it's currently off):
cat '/sys/class/leds/input6::scrolllock/brightness'       

##To switch the LED on, we must set that file's content to 1:
echo 1| sudo tee '/sys/class/leds/input6::scrolllock/brightness'        


step 4 :

## To switch the LED on during every boot  ##

sudo nano /etc/rc.local   ## add tow commands in below :
#!/bin/bash                                  
echo 1| sudo tee '/sys/class/leds/input6::scrolllock/brightness'  

step 5 :
sudo chmod +x /etc/rc.local     ##for change accses file
sudo init 6                     ## for reboot 








xmodmap -e "add mod3 = Scroll_Lock"    //switch scroll look & this command add in app startup 20.04
sudo dpkg-reconfigure keyboard-configuration


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

sudo virtualbox   //open virtualbox from command line 
sudo usermod -G vboxusers -a $USER  #virtualbox not showing usb devices in user


sudo apt-git upgrade      //make update onle
sudo apt-get dist-upgrade \\ take you for ather version from ubuntu  
aptitude vs apt-get       //nono

 ps -aux | less     \\tasks-list >>>give you progrom on in your pc  


//delete cash
sudo systemd-resolve --statistics
sudo systemd-resolve --flush-caches

>>>>>>
touch  //create file
sudo visudo  //add this in file becose change login to root by sudo and password >>>>| %sudo  ALL=(ALL:ALL)NOPASSWD:ALL
grep "enp7s0" my-ip.txt > qwqw.txt   \\make searsh on any thing and echo for file custom
sudo ifconfig > my-ip.txt
>>>>>>>>>>>>>>>>
sudo nano .bashrc      //add alias command to file  nano .bashrc 
alias st=" sudo systemctl status"
xmodmap -e "add mod3 = Scroll_Lock"    //switch scroll look & this command add in app startup
>>>>>>>

<<<<<<,
echo "add any commana hhhhhhhhhhhh" >> ~/.profile         /// nano .profile    هاد عشان احط اي امر في اي ملف بدون ما افتحه
echo "hmood" >> ~/hmood/command-linux/solveproblem.txt       //example for my code to my file        هاد عشان احط اي امر في اي ملف بدون ما افتحه
cat *.txt > 2a.txt 
cat 1jhk.txt > 2a.txt 
<<<<<<<<<<<<<<

https://ss64.com/bash/chmod.html
sudo chmod -R 777 name-file-wht-upu-want     ///open for accsess all users 
sudo chmod 644  #for example file /etc/hosts
sudo code --user-data-dir="~/.vscode-root"       // open  visual studio code in root 
 
>>>>>>>>>>>>>
sudo ssh-keygen -t rsa -b 4096 -C "[email protected]"
sudo cat /root/.ssh/id_rsa.pub        //add for site 
sudo cat /root/.ssh/id_rsa            \\ the file key   password file 12345678++
sudo ssh -T [email protected]    
<<<<<<<<<<<<<
ssh [email protected] -p 2222  #for remote ssh 


<<<<<<<<
sudo nano /root/.ssh/known_hosts     //for solve problem not connect ssh //delete all key in the file 
sudo rm /root/.ssh/known_hosts        //remove file the brst option
<<<<<<<<

 sudo hostname new-server-name-here  //cahnge hostname 

<<<<<<<<<<<<
dpkg-query -W -f='${binary:Package}\n' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e '^java-common' | xargs sudo apt-get -y remove

sudo apt-get purge jenkins

//remove java or jdk
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#how to change hostname in ubuntu
#1- Delete the old name and setup new name
sudo hostnamectl set-hostname newHostname

#2- Edit the /etc/hosts file:
sudo nano /etc/hosts

#3- Reboot the system 
sudo reboot

#4- To check the new hostname
hostnamectl
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Posted by: Guest on October-06-2021

Code answers related to "meto"

Browse Popular Code Answers by Language