Check These Out
works as well as echo $0, but also prints process id, which pts you're using. echo $SHELL doesn't always get updated when changing shells, so this is a better solution than that. Just one more variation on a theme.
Note that the file at the given path will have the contents of the (still) deleted file, but it is a new file with a new node number; in other words, this restores the data, but it does not actually "undelete" the old file.
I posted a function declaration encapsulating this functionality to http://www.reddit.com/r/programming/comments/7yx6f/how_to_undelete_any_open_deleted_file_in_linux/c07sqwe (please excuse the crap formatting).
compgen -c finds everything in your path.
Replace vid.mp4 with the path to your original video file, and out.mp4 to the path where you want to save the new file.
To view the output first before saving, remove "-consumer avformat:out.mp4" from the end.
Documentation for mlt framework and melt command can be found here:
http://www.mltframework.org/bin/view/MLT/Documentation
Manages everything through one sed script instead of pipes of greps and awks. Quoting of shell variables is generally easier within a sed script.
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video).
$ cat /proc/acpi/video/VGA/LCD/brightness
to discover the possible values for your display.
Was playing with the shell. It struck to me, just by rearranging the parameters, i was able to remember what they did and in a cool way.
Enter the 'hitlar' mode.
bash-3.2$ ls -hitlar
Shows all items with inodes, in list view, human readable size, sorted by modification time in reverse,
bash-3.2$ ls -Fhitlar
Shows the same with classification info. Add the hitlar mode alias to your .bashrc.
bash-3.2$ echo "alias hitlar='ls -Fhitlar'" >> ~/.bashrc
bash-3.2$ hitlar
bash-3.2$ hitlar filename
This will start a netcat process listening on port 666. If you are able connect to your your server, netcat will receive the data being sent and spit it out to the screen (it may look like random garbage, so you might want to redirect it to a file).
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"