This one-liner will list all files in a directory by modification time, newest first. [email protected]:~/Pictures$ ls [email protected]:~/Pictures$ ls -thul Use it this way to list the top 20 files listed. [email protected]:/var/log$ ls -thul | head -n 20 total 6.9M -rw-rw-r– 1 root utmp 9.0K Jul 9 11:30 wtmp -rw-r–r– 1 root root 85K Jul 9 …

The ls command for Linux may be used to list more than one thing at a time. These examples demonstrate this. [email protected] ~ $ ls -p /opt/ /bin/rm /bin/rm   /opt/: firefox/ [email protected] ~ $ ls -p /opt/ /bin/rm /bin/rm /opt/: firefox/ mint-flashplugin-11/ Here is a more verbose version of this command. With human readable …

This command shows how to display a listing of files with ls and show line numbers at the same time. [email protected] ~/Desktop/Site % ls | nl 1 back.jpg 2 bejiitas_phpb1 3 bejiitas_phpb1.sql 4 cgi-bin 5 Files.tar.lzma 6 Map07Tufb.zip 7 my2.tar.lzma 8 program.c 9 quake38.jpg 10 sysinfo 11 tekcrazy_2.zip 12 wrap.rar if you wish to not …

This is another way to see where you are in the directory stack. [email protected] ~/Documents/basenew $ echo $DIRSTACK [email protected] ~/Documents/basenew $ echo $DIRSTACK ~/Documents/basenew Here is another way to show the $PWD value one directory down from where you are now. [email protected] ~/Documents/basenew $ echo $OLDPWD [email protected] ~/Documents/basenew $ echo $OLDPWD /home/homer/Documents This example shows …

This is a standard listing of files with wildcards in the bash shell. [email protected] ~/Documents $ ls *.wad basenew.wad cc4-tex.wad city-heat.wad dark.wad doom.wad plutonia.wad scythe2.wad SKYTEST.wad brick.wad cchest4.wad consoleCopy.wad doom2.wad hexen.wad RIII.wad scythex.wad SODfinal.wad And this is how to use the sed command to filter the output to change it. [email protected] ~/Documents $ ls *.wad …

How do you search a binary file for a certain string that ends in a number; but you are not sure what the number is? Then this command will perform this task. [email protected] ~/Documents/master $ strings vesperas.wad | grep -a “MAP[0-9]” MAP15 I was using this command as I had a folder full of Doom …

To view the contents of an ISO ┬áimage, the isoinfo command for Linux will come in very useful indeed. Just type isoinfo -f -i myiso.iso to view the contents of the ISO image as shown in this example. C:\MEDIA\ELEMENTS\FILES\ISOS> isoinfo -f -i linuxmint-11-gnome-dvd-64bit.iso /BOOT /CASPER /EFI /ISOLINUX /MD5SUM.TXT;1 /PRESEED /_DISK /BOOT/GRUB /CASPER/FILESYSTEM.MANIFEST;1 /CASPER/FILESYSTEM.MANIFEST_DESKTOP;1 /CASPER/FILESYSTEM.SIZE;1 /CASPER/FILESYSTEM.SQUASHFS;1 …

Using wild-cards to display various files in a folder with ls. I recently needed to check whether certain files were in the /usr/lib folder and I used the ls command to do this. to find all files with the text mad in their file-name. [email protected] ~ $ ls /usr/lib/*mad* lrwxrwxrwx. 1 root root 15 18-12-11 …