Commands by vududevil (2)

  • Use set +o noclobber and you will be able to replace files again Show Sample Output


    7
    set -o noclobber
    vududevil · 2009-03-10 01:39:18 0
  • Add the functions to the .bashrc to make it work Example: First go to the iso file directory and type: ---------------------------------------------------------------------------------------------------- [email protected]:~$ miso file.iso ---------------------------------------------------------------------------------------------------- It will put you into a temporary mounting point directory (ISO_CD) and will show the files You can umount the iso file whatever the directory you are ---------------------------------------------------------------------------------------------------- [email protected]:~/ISO_CD$ uiso ---------------------------------------------------------------------------------------------------- It wil umount the iso file and remove the temporary directory in your home


    4
    function miso () { mkdir ~/ISO_CD && sudo mount -o loop "[email protected]" ~/ISO_CD && cd ~/ISO_CD && ls; } function uiso () { cd ~ && sudo umount ~/ISO_CD && rm -r ~/ISO_CD; }
    vududevil · 2009-02-25 03:41:35 1

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Synthesize text as speech
The Festival Speech Synthesis System converts text into sound. Or: links -dump http://youfavoritewebsite.com | festival --tts

list all file extensions in a directory
Just a little simplification.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Manipulate the metadata when the photo was taken, this will shift with +15hours + 30min

Selecting a random file/folder of a folder
Also looks in subfolders

Print all open regular files sorted by the number of file handles open to each.
List all open files of all processes. . $ find /proc/*/fd Look through the /proc file descriptors . $ -xtype f list only symlinks to file . $ -printf "%l\n" print the symlink target . $ grep -P '^/(?!dev|proc|sys)' ignore files from /dev /proc or /sys . $ sort | uniq -c | sort -n count the results . Many processes will create and immediately delete temporary files. These can the filtered out by adding: $ ... | grep -v " (deleted)$" | ...

Btrfs: Find file names with checksum errors
Btrfs reports the inode numbers of files with failed checksums. Use `find` to lookup the file names of those inodes. The files may need to be deleted and replaced with backups.

capture selected window

most changed files in domains by rdiff-backup output

View details of network activity, malicious or otherwise within a port range.
View details of both TCP and UDP network activity within a specified port range.


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: