Posted: . At: 10:38 AM. This was 10 years ago. Post ID: 7130
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Some miscellaneous Linux commands for the desktop user.

Find all files larger than 1 megabyte in a directory.

find . -maxdepth 1 -type f -size +1M -printf "%f:%s\n" | sort -t":" -k2

Search a file for a certain string.

grep "hello" my.txt

Get the hostname from an IP address.

Homer@bejiitas - $ ipcalc -h 74.125.237.194/24
HOSTNAME=google.com

Use wildcards on the command line to find a file.

Homer@bejiitas - $ ls Nut*[0-9]*.w*
Nuts2.wad          Nuts2.wad.backup1
Bill Gates in the old days.
Bill Gates in the old days.

Print the value of an environment variable in uppercase.

homer@deusexmachina ~ $ echo ${LOGNAME^^}
HOMER

Linux commands to find out hardware information: http://www.securitronlinux.com/linux/linux-commands-to-find-out-hardware-information/.

Linux commands for absolute beginners: http://www.securitronlinux.com/linux-mint-2/useful-linux-commands-and-tips-for-beginners/.

Writing an ISO image to a CDR or DVDR with the command line: http://www.securitronlinux.com/bejiitaswrath/some-more-useful-linux-commands-for-the-bash-shell/.

Find the largest file in a directory and other useful Linux commands: http://www.securitronlinux.com/linux-mint-2/finding-the-largest-file-in-a-directory-and-other-cool-linux-commands/.

Working with file permissions: http://www.securitronlinux.com/mint_linux/useful-commands-in-linuxunix/.

1 thought on “Some miscellaneous Linux commands for the desktop user.”

  1. Just to point out that the RedHat ipcalc tool, is different from the Krischan Jodies ipcalc tool.
    Tools like host, nslookup, dig and resolveip can be used to get the hostname from an IP address.

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.