Tips tagged xargs


Tip #676   The poor man's REPL

This is the general form; it will run 'mycommand' once for each line of text you enter with that line of text supplying the arguments to the command:

Read more »


Tip #571   Change file extension revisited

And again about file extension changing.

There are two tips about this:
#27 -
#544 -

I'm happy to provide one more variant. It's up to you which one is the most useful. Read more »


Tip #558   Being selfish - Kick all users except you

Kick all users other than you from your box and keep them out.

Read more »


Tip #323  

It's for removing those orphaned config files! :D

Read more »


Tip #254  

Make a backup of existing files, afterwards copy new files from somedir:

1. Go to proddir
Read more »


Tip #251   Argument list too long

ls | xargs rm

Sometime there are so many files in a directory than the rm command doesn't work
Read more »


Tip #232   Deleting difficult filenames

To delete a file who's file name is a pain to define (eg. ^H^H^H) find it's inode number with the command "ls -il". Use the line below to find and delete the file.
Read more »


Tip #181   Remove empty directories

To remove empty directories (even if filenames or dirnames contain spaces or weird characters) from a tree you can do:

Read more »


Tip #177   Copy and paste from the command line

Add the following alias and function to your profile to be able to copy and paste files at the command line:

Read more »


Tip #173   Count files by type

To find out the number of files of each type in your current directory try the following:

Read more »