Category: Linux

List all Installed RPMs by Size

Show space used by rpm packages installed sorted by size (fedora, redhat and like) rpm -q -a –qf “%10{SIZE}\t%{NAME}\n” |…

Reverse a File

This commands reverses a file in linux – the last line will be the first… tac file.txt tac = reverse…

Command to View just the Files

View just the files of directory ls -F

Command to Sort Files by Size

Show size of the files and directories sorted by size du -sk * | sort -rn

Show Space Usage of a Directory

Estimate space used by directory. du -sh dir

Command to io to Previous Folder

Go back to the previous folder cd –

Mount Windows Partion

Mount a Windows FAT partition. If it is an NTFS partion, use ‘ntfs’ instead of ‘fat’. Make sure that the…

Modify timestamp in Linux

Modify timestamp of a file or directory touch -t 0712250000 file #(YYMMDDhhmm)

Command to mount a Samba Share in Linux

Mount a windows network share in Linux using Samba mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share

Cancel Planned Shutdown

Cancel a planned shutdown of the system shutdown -c