This command create a new temp directory using mktemp (to avoid collisions) and change the current working directory to the created directory. Show Sample Output
this takes every jpg in the current directory and changes the exif data for manufactur and model. in my case i change it to LOMO LC-A because my scanner puts his data in there :]
Usage:
up N
I did not like two things in the submitted commands and fixed it here:
1) If I do cd - afterwards, I want to go back to the directory I've been before
2) If I call up without argument, I expect to go up one level
It is sad, that I need eval (at least in bash), but I think it's safe here.
eval is required, because in bash brace expansion happens before variable substitution, see http://rosettacode.org/wiki/Repeat_a_string#Using_printf
If you have lots of remote hosts sitting "behind" an ssh proxy host, then there is a special-case use of "rsynch" that allows one to easily copy directories and files across the ssh proxy host, without having to do two explicit copies: the '-e' option allows for a replacement "rsh" command. We use this option to specify an "ssh" tunnel command, with the '-A' option that causes authentication agent requests to be forwarded back to the local host. If you have ssh set up correctly, the above command can be done without any passwords being entered.
sometimes I need list from path with max limit for recursive depth directory listing
Usage: upto directory Show Sample Output
You set the file/dirname transfer variable, in the end point you set the path destination, this command uses pipe view to show progress, compress the file outut and takes account to change the ssh cipher. Support dirnames with spaces. Merged ideas and comments by http://www.commandlinefu.com/commands/view/4379/copy-working-directory-and-compress-it-on-the-fly-while-showing-progress and http://www.commandlinefu.com/commands/view/3177/move-a-lot-of-files-over-ssh Show Sample Output
Like normal ls, but only lists directories. Can be used with -l to get more details (ls -lad */) Show Sample Output
pushd and popd are your friends, but sometimes they're just incompatible with the way one works... Two shell functions: bm bookmarkname - "bookmarks" the current directory, just 'cd $BMbookmarkname' to return to it. forget bookmarkname - unsets the 'bookmarkname' variable. It isn't mandatory, they cease to exist when the session ends. Show Sample Output
move filename/rename filenames with Uppercase to lowercase in current directory Show Sample Output
Finds all *.p[ml]-files and runs a perl -c on them, checking whether Perl thinks they are syntactically correct Show Sample Output
very handy if you copy or download a/some file(s) and want to know how big it is at the moment
Backup a whole directory copying only updated files.
or
tree -ifsF --noreport .|sort -n -k2|grep -v '/$'
(rows presenting directory names become hidden)
Coming back to a project directory after sometime elsewhere? Need to know what the most recently modified files are? This little function "t" is one of my most frequent commands. I have a tcsh alias for it also: alias t 'ls -ltch \!* | head -20' Show Sample Output
This command shows the size of directories below here, refreshing every 2s. It will also track directories created after running the command (that what the find bit does). Show Sample Output
Do you have a large library of flv's you have picked up over the years using FlashGot Firefox plugin? Do you want to be able to convert them to Ogg Theora (video) at once? Try out this script... Show Sample Output
You don't need to use "*", it will fail if the working directory has too many fails due parameter extension, you can simply pass the working directory using ".".
You don't need to use "*", it will fail if the working directory has too many fails due parameter extension, you can simply pass the working directory using ".".
Returns the most recently modified file in the current (or specified) directory. You can also get the oldest file, via: ls -t1 $* | tail-1 ;
This let me find some a set of modifications that were made to a rather large tree of files, where the file-names themselves were not unique (actually: insanely redundant and useless. "1.dat 2.dat ..."). Pruning down to last-branch brough things back to the "project-name" scope, and it's then easy to see which branches of the tree have recently changed, or any other similar search. Ideally, it should sort the directories by the mtime of the most recent *file* *inside* the directory, but that's probably outside the scope of a (sane...) command line.
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.
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
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: