chown lsof 3yy 3dd

The current status of a Linux software raid is written to the file /proc/mdstat. You can view the status on the shell with the command:
cat /proc/mdstat
-=-=-=-=-=
a daemon (/ˈdiːmən/ or /ˈdeɪmən/)[1] is a computer program that runs as a background process, rather than being under the direct control of an interactive user.
-=-=-=-=-=
check all running services
-=-=-=-=-=
Where are sudo incidents logged?
-=-=-=-=-=
How to make a hidden file in linux - You can just add a . to the front of the file name.
-=-=-=-=-=
How to delete all files in the directory
Without knowing where exactly you executed this command, it's hard to say why that is, but it seems that you deleted something that your system needs to function.rm -rf * does pretty much as you say (excluding the fact that that it ignores hidden files). In general, it's a better idea to go up one directory and rm -r the directory itself, recreating it if necessary
-=-=-=-=-=
how to change default shell
chsh -s /bin/bash
In my case, I had root access but didn't want to mess with any configurations on the actual host. I added exec /bin/bash to ~/.profile and this allowed me to login directly to bash without making any changes to the server
chsh -s /usr/local/bin/bash username
On Red Hat Linux default shell is specified in /etc/default/useradd
-=-=-=-=-=
find exec
find . -name "f*" –delete
у GNU find есть параметр -delete, более безопасный, нежели "-exec /bin/rm {};"
find -exec command {} \;
For each result, command {} is executed. All occurences of {} are replaced by the filename. ; is prefixed with a slash to prevent the shell from interpreting it.
find . -name "f*" -exec rm {} \;
 -------------------
find will execute grep and will substitute {} with the filename(s) found. The difference between ; and + is that with ; a single grep command for each file is executed whereas with + as many files as possible are given as parameters to grep at once.
find . -exec grep chrome {} \;
or
find . -exec grep chrome {} +
-=-=-=-=-=
install svn ubuntu
-=-=-=-=-=
How to check date of file creation
stat file.txt
There is a “crtime” (create time) timestamp in the debugfs stat output. finally EXT4 supports create time just like “btime” in NTFS windows.
-=-=-=-=-=
chown
"Recursive" implies that the operation will be performed for all files and directories (and all files and directories within any directory). So
chown -R foo /some/path
would change file owner to foo for all files and directories in /some/path
chown -R someuser:somegroup *.pdf
-=-=-=-=-=
So to see which process is listening upon port 80 we can run:
root@mystery:~# lsof -i :80
-=-=-=-=-=
To show connections to a specific host, use @host
-=-=-=-=-=
lsof +D /some/directory
Will display recursively all the files opened in a directory. +d for just the top-level.
This is useful when you have high wait% for IO, correlated to use on a particular FS and want to see which processes are chewing up your io.
-=-=-=-=-=
See what files a running application or daemon has open:
lsof -p pid
-=-=-=-=-=
lsof +f -- /mountpoint
lists the processes using files on the mount mounted at /mountpoint. Particularly useful for finding which process(es) are using a mounted USB stick or CD/DVD.
-=-=-=-=-=
To copy 2 lines in vi:
2yy
To cut 3 lines in vi
3dd
To paste 3 lines
p/P
-=-=-=-=-=

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all