Check These Out
I have a bash alias for this command line and find it useful for searching C code for error messages.
The -H tells grep to print the filename. you can omit the -i to match the case exactly or keep the -i for case-insensitive matching.
This find command find all .c and .h files
Return the creation date of a file on ext2, 3, 4 filesystems, because stat command won't show it.
Useful on ubuntu, debian, and else
Gives you a list for all installed chrome (chromium) extensions with URL to the page of the extension.
With this you can easy add a new Bookmark folder called "extensions" add every URL to that folder, so it will be synced and you can access the names from every computer you are logged in.
------------------------------------------------------------------------------------------------------------------
Only tested with chromium, for chrome you maybe have to change the find $PATH.
if you have problem threads problem in tomcat
Imagine you've started a long-running process that involves piping data,
but you forgot to add the progress-bar option to a command.
e.g.
$ xz -dc bigdata.xz | complicated-processing-program > summary
.
This command uses lsof to see how much data xz has read from the file.
$ lsof -o0 -o -Fo FILENAME
Display offsets (-o), in decimal (-o0), in parseable form (-Fo)
This will output something like:
.
p12607
f3
o0t45187072
.
Process id (p), File Descriptor (f), Offset (o)
.
We stat the file to get its size
$ stat -c %s FILENAME
.
Then we plug the values into awk.
Split the line at the letter t: -Ft
Define a variable for the file's size: -s=$(stat...)
Only work on the offset line: /^o/
.
Note this command was tested using the Linux version of lsof.
Because it uses lsof's batch option (-F) it may be portable.
.
Thanks to @unhammer for the brilliant idea.
Sometimes it's useful to output just the ip address. Or some other information, changing the "ipv4.addresses" in command. The power of awk! Show all possible "greps" with
$ nmcli connection show [yourInterfaceNameHere]
After you run this script, you can check status for broken symlink with this command:
find -L . -type l
Shows all block devices in a tree with descruptions of what they are.
this leaves the cursor at the bottom of the terminal screen, where your eyes are.
ctrl-l moves it to the top, forcing you to look up.
Converts IP octets to hex using printf command. Useful for generating pxeboot aliases in the pxelinux.cfg folder.