brainlesssteel
16 Haziran 2017 Cuma
VIM indentation
On Fedora 25
go to /etc
edit file vimrc
add
set tabstop=4
set shiftwidth=4
save and close
6 Mart 2017 Pazartesi
Laptop Can See Wireless Networks But One
If your laptop can't connect some Wi-Fi networks you should try to decrease the Channel value on router.
Some wireless adapters are not able to connect channel 12-13-14 so you should try 11 or lower.
Some wireless adapters are not able to connect channel 12-13-14 so you should try 11 or lower.
21 Kasım 2016 Pazartesi
Note to myself
apt-get -f upgrade
apt-get update
dpkg -i bla bla bla
http://www.thegeekstuff.com/2009/04/vi-vim-editor-search-and-replace-examples/
http://www.tecmint.com/wc-command-examples/
http://www.thegeekstuff.com/2012/10/15-linux-split-and-join-command-examples-to-manage-large-files/
http://www.livefirelabs.com/unix_commands/5-unix-diff-command-examples-of-how-to-compare-two-text-files.htm
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
https://www.cyberciti.biz/tips/howto-keep-file-safe-from-overwriting.html
apt-get update
dpkg -i bla bla bla
http://www.thegeekstuff.com/2009/04/vi-vim-editor-search-and-replace-examples/
http://www.tecmint.com/wc-command-examples/
http://www.thegeekstuff.com/2012/10/15-linux-split-and-join-command-examples-to-manage-large-files/
http://www.livefirelabs.com/unix_commands/5-unix-diff-command-examples-of-how-to-compare-two-text-files.htm
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
https://www.cyberciti.biz/tips/howto-keep-file-safe-from-overwriting.html
19 Kasım 2016 Cumartesi
Creating group, giving sudo privileges and adding user to the group
Step 1: Login to root account
..$ su
Step 2: Adding user
..# useradd -m frank
Step 3: Creating group
..# groupadd rangers
Step 4: Edit sudoers and add rangers into
..# vim /etc/sudoers
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
%rangers ALL=(ALL:ALL) ALL
..$ su
Step 2: Adding user
..# useradd -m frank
Step 3: Creating group
..# groupadd rangers
Step 4: Edit sudoers and add rangers into
..# vim /etc/sudoers
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
%rangers ALL=(ALL:ALL) ALL
save and exit
Step 5: Adding frank to rangers
..# usermod -a -G rangers frank
Finished.
Now you have a user frank in the rangers group, which was added to sudoers file.
You should able to use sudo while you are frank.
locate command
Before using locate command, you should update db
..$ sudo updatedb
then you can use locate.
..$ locate mypicture
..$ sudo updatedb
then you can use locate.
..$ locate mypicture
18 Kasım 2016 Cuma
Fast Search
There are couple of ways to make searching.
One of them:
ls | grep
..$ ls | grep dir
workingdir
direct
dire
It shows us anything contains dir.
note:
cat /etc/issue
shows you to which os currently you have.
5 Ekim 2016 Çarşamba
Internal and External Commands
Internal commands are buil-in commands.
If you don't know the type of a command, you can use "type" command:
..$ type cd
cd is a shell builtin
..$ type pwd
pwd is a shell builtin
..$ type bash
bash is /bin/bash
There is a trick about "type" command:
..$ type -a pwd
pwd is a shell builtin
pwd is /bin/pwd
"-a" option shows us is the command duplicated by external command or not.
let's understand it with "time" command:
..$ time pwd
/home/user
real 0m0.000s
user 0m0.000s
sys 0m0.000s
..$/usr/bin/time pwd
/home/user
0.00user 0.00system 0:00.04elapsed 0%CPU
(0avgtext+0avgdata 2240maxresident)k
64inputs+0outputs (1major+83minor)pagefaults 0swaps
So what happened up there:
When we typed "time pwd" we used the internal(built-in) time command
Then we typed "/usr/bin/time pwd" that was the external time command
I hope this is a helpful explanation about difference between internal and external commands.
If you don't know the type of a command, you can use "type" command:
..$ type cd
cd is a shell builtin
..$ type pwd
pwd is a shell builtin
..$ type bash
bash is /bin/bash
There is a trick about "type" command:
..$ type -a pwd
pwd is a shell builtin
pwd is /bin/pwd
"-a" option shows us is the command duplicated by external command or not.
let's understand it with "time" command:
..$ time pwd
/home/user
real 0m0.000s
user 0m0.000s
sys 0m0.000s
..$/usr/bin/time pwd
/home/user
0.00user 0.00system 0:00.04elapsed 0%CPU
(0avgtext+0avgdata 2240maxresident)k
64inputs+0outputs (1major+83minor)pagefaults 0swaps
So what happened up there:
When we typed "time pwd" we used the internal(built-in) time command
Then we typed "/usr/bin/time pwd" that was the external time command
I hope this is a helpful explanation about difference between internal and external commands.
Kaydol:
Kayıtlar (Atom)