Linux Commands
Man
Which
Whereis
Invoking Programs
Linux OS Directories
Mounting & UnMounting Devices
Searching for Files
CPU Information & Stats
System Commands in /bin
System Commands in /etc
System Commands in /sbin
System Commands in /usr/bin
System Commands in /usr/sbin
How can I empty a file?
Issue the following command to empty a file that currently exists:
cp /dev/null
How can I see how large a folder is on the system?
Issue the following command to see how large a folder is and the files it contains:
du -h
How can I find out how many files are within a specific folder?
ls | wc -l
How can I copy all the contents of one folder into another?
cp -r
How can I delete all of the files in a folder and the folder itself?
rm -r
How can I remove all files older than 7 days?
find \ (-name '*' \) -atime +7 -exec rm {}\
Just the change the +7 to a specific number of days if required.
0 Reply to "Linux Commands"
Post a Comment