Tag Archives: linux

Linux: find all files in folder with extension

ls -R | grep gif$
The above command will list of the gif files you have in your folder (it will look recussively in subfolders). If you wanted to see the paths as well you could use the find command:
find ./ -name *gif$*

Rsync: copy files but not .svn directories

rsync -n –exclude .svn -av /PATH/TO/SOURCE/DIR/* /PATH/TO/DEST/DIR/
rsync –exclude .svn -av /PATH/TO/SOURCE/DIR/* /PATH/TO/DEST/DIR/
The first command will similulate the copy (useful to test). The second command will actually execute the sync.

Linux: List files by time

ls -lt
Or you can flip reverse it:
ls -ltr

Linux: pwd show real location (not symlink)

pwd -P
Use the physical flag luke!