Tips tagged xargs


4

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 »

8

Tip #571   Change file extension revisited

And again about file extension changing.

There are two tips about this:
#27 - http://www.shell-fu.org/lister.php?id=27
#544 - http://www.shell-fu.org/lister.php?id=544

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

8

Tip #558   Being selfish - Kick all users except you

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

Read more »

2

Tip #323  

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

Read more »

10

Tip #254  

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

1. Go to proddir
Read more »

4

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 »

59

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 »

18

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 »

19

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 »

20

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 »