Category Archives: cli

Use memorized arguments for long commands

You want to apply two different commands on the same file or directory. You don’t have to type the path all over again. Use it like this:cat /home/user/Downloads/folder1/folder2/file.txtrm $_ In this case, rm $_ is the same as typing rm /home/user/Downloads/folder1/folder2/file.txt . This can sometimes save you a lot of time.

CLI tip: Go back to the previous directory

While in Terminal, going back to the previous directory can be done with the classic cd ..But there’s another way. make an alias of you choice for cd $OLDPWD, like this: alias cdo=’cd $OLDPWD’ Now every time you’ll tipe cdo you’ll be taken to the previous directory you were in. This is very useful when… Read More »

Find all world-writable files

If you are an administrator and have users on your server, keeping files with limited permissions should be a priority. To seek out all world-writable files on your machine, do a simple find / -perm -2 ! -type l -ls