Finds a string in files recursively below the current directory on systems without the "egrep" and its "-r" functionality. Show Sample Output
Not that useful really, more novel. Can open up an awful lot of terminal windows.
WARNING! This command may set an invalid permission under your current directory. This command will set the 0755 permissions to all directories under your current directory. An alternative version of this command is: find ~/.ssh -type d -exec chmod 0700 {} \;
Parsing the output of ls is never a good idea for any reason. Using find this way: - works with files that have spaces in their names. - actually lists "sub folders" and not of all files and folders. - does not break if there are a huge number of files in the current directory.
Read all contents from current directory and display to stdout.
rename is a great command, but can't get it to work on mac.
This command is useful for archiving or extracting Documents and Settings folder, when working in Linux box with Windows partition (dual boot installation). You have to enter into appropriate directory, of course.
Thanks for the comments Show Sample Output
This will handle the case that the filename has spaces or other characters that need to be escaped.
WARNING! This command may set an invalid permission under your current directory. This command will set the 0644 permissions to all files under your current directory. An alternative version of this command is: find ~/.ssh -type f -exec chmod 0600 {} \;
Esse comando procura por arquivos php que que iniciem com ' Show Sample Output
Read all contents from current directory and display it on stdout.
Takes filenames and directory names and replace space to '_'.
Will find all files containing "sample" in the current directory and in the directories below.
sometimes if directories are too deep, chmod -R fails... in those cases, a find comes in most handy :)
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: